mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 09:06:19 +08:00
init: the first public commit for AFFiNE
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import * as React from 'react';
|
||||
/* eslint-disable no-restricted-imports */
|
||||
import MuiCheckbox, { type CheckboxProps } from '@mui/material/Checkbox';
|
||||
import {
|
||||
CheckBoxUncheckIcon,
|
||||
CheckBoxCheckIcon,
|
||||
} from '@toeverything/components/icons';
|
||||
import { styled } from '../styled';
|
||||
|
||||
export { CheckboxProps };
|
||||
|
||||
export const Checkbox = (props: CheckboxProps) => {
|
||||
return (
|
||||
<StyledCheckbox
|
||||
icon={<CheckBoxUncheckIcon />}
|
||||
checkedIcon={<CheckBoxCheckIcon />}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
const StyledCheckbox = styled(MuiCheckbox)`
|
||||
padding: 0;
|
||||
color: #b9cad5;
|
||||
&.Mui-checked {
|
||||
color: #b9cad5;
|
||||
}
|
||||
`;
|
||||
@@ -0,0 +1,2 @@
|
||||
export { Checkbox } from './Checkbox';
|
||||
export type { CheckboxProps } from './Checkbox';
|
||||
Reference in New Issue
Block a user