parent
5ce79ff856
commit
c3a17a7228
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
import React from 'react';
|
||||
import { useArgs } from '@storybook/client-api';
|
||||
import Checkbox from '.';
|
||||
import Checkbox, { CheckboxProps } from '.';
|
||||
|
||||
export default {
|
||||
title: 'Checkbox',
|
||||
|
|
@ -42,9 +42,8 @@ export const CheckboxGallery = () =>
|
|||
</div>
|
||||
));
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
export const InteractiveCheckbox = _args => {
|
||||
const [{ checked, style }, updateArgs] = useArgs();
|
||||
export const InteractiveCheckbox = ({ checked, style }: CheckboxProps) => {
|
||||
const [, updateArgs] = useArgs();
|
||||
const toggleCheckbox = () => {
|
||||
updateArgs({ checked: !checked });
|
||||
};
|
||||
|
|
@ -49,3 +49,5 @@ export default function Checkbox({ checked, onChange, style }: CheckboxProps) {
|
|||
</Styles>
|
||||
);
|
||||
}
|
||||
|
||||
export type { CheckboxProps };
|
||||
|
|
|
|||
|
|
@ -16,5 +16,5 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
export { default } from 'src/components/Checkbox/Checkbox';
|
||||
export { default, CheckboxProps } from 'src/components/Checkbox/Checkbox';
|
||||
export * from 'src/components/Checkbox/CheckboxIcons';
|
||||
|
|
|
|||
Loading…
Reference in New Issue