mirror of
https://github.com/apache/superset.git
synced 2026-04-07 10:31:50 +00:00
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user