소스 검색

RequireChip パラメータの与え方を修正

develop
sosuke.iwabuchi 2 년 전
부모
커밋
4b9c8a51b5
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. +5
    -5
      src/components/chip/RequireChip.tsx

+ 5
- 5
src/components/chip/RequireChip.tsx 파일 보기

@@ -1,10 +1,10 @@
import { Chip, ChipProps } from "@mui/material";

export type RequireChipProps = { show?: boolean } & ChipProps;
export default function RequireChip(props: RequireChipProps) {
const { show } = props;
if (show === false) {
export type RequireChipProps = { require?: boolean } & ChipProps;
export default function RequireChip({ require, ...others }: RequireChipProps) {
if (require === false) {
return null;
}
return <Chip size="small" label="必須" color="error" {...props} />;
return <Chip size="small" label="必須" color="error" {...others} />;
}

Loading…
취소
저장