Skip to content

Commit

Permalink
chore(Fluid): add fluid skeletons as subcomponents in story files
Browse files Browse the repository at this point in the history
  • Loading branch information
tw15egan committed Dec 8, 2022
1 parent ccd1668 commit baa5922
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import { Information } from '@carbon/icons-react';
export default {
title: 'Experimental/unstable__FluidComboBox',
component: FluidComboBox,
subcomponents: {
FluidComboBoxSkeleton,
},
};

const items = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import { Information } from '@carbon/icons-react';
export default {
title: 'Experimental/unstable__FluidDatePicker',
component: FluidDatePicker,
subcomponents: {
FluidDatePickerSkeleton,
},
};

const ToggleTip = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import { Information } from '@carbon/icons-react';
export default {
title: 'Experimental/unstable__FluidDropdown',
component: FluidDropdown,
subcomponents: {
FluidDropdownSkeleton,
},
};

const items = [
Expand Down
15 changes: 14 additions & 1 deletion packages/react/src/components/FluidForm/FluidForm.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import FluidTextInput from '../FluidTextInput';
import FluidTextArea from '../FluidTextArea';
import FluidTimePicker from '../FluidTimePicker';
import FluidTimePickerSelect from '../FluidTimePickerSelect';
import FluidNumberInput from '../FluidNumberInput';
import ModalWrapper from '../ModalWrapper';

const additionalProps = {
Expand Down Expand Up @@ -100,7 +101,19 @@ export const Default = () => (
</SelectItemGroup>
</FluidSelect>
</div>
<FluidTextInput {...TextInputProps} />
<div style={{ display: 'flex' }}>
<FluidTextInput {...TextInputProps} />
<FluidNumberInput
label="Number Input Label"
placeholder="Placeholder text"
id="input-default"
step={10}
min={0}
max={100}
defaultValue={50}
/>
</div>

<FluidTextInput
type="password"
pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import { Information } from '@carbon/icons-react';
export default {
title: 'Experimental/unstable__FluidMultiSelect',
component: FluidMultiSelect,
subcomponents: {
FluidMultiSelectSkeleton,
},
};

const items = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import { Information } from '@carbon/icons-react';
export default {
title: 'Experimental/unstable__FluidNumberInput',
component: FluidNumberInput,
subcomponents: {
FluidNumberInputSkeleton,
},
};

const ToggleTip = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import { Information } from '@carbon/icons-react';
export default {
title: 'Experimental/unstable__FluidSelect',
component: FluidSelect,
subcomponents: {
FluidSelectSkeleton,
},
argTypes: {
onChange: {
action: 'onChange',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import { Information } from '@carbon/icons-react';
export default {
title: 'Experimental/unstable__FluidTextArea',
component: FluidTextArea,
subcomponents: {
FluidTextAreaSkeleton,
},
argTypes: {
hideLabel: {
table: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import './test.scss';
export default {
title: 'Experimental/unstable__FluidTextInput',
component: FluidTextInput,
subcomponents: {
FluidTextInputSkeleton,
},
};

export const Default = () => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ import { Information } from '@carbon/icons-react';
export default {
title: 'Experimental/unstable__FluidTimePicker',
component: FluidTimePicker,
subcomponents: {
FluidTimePickerSelect,
FluidTimePickerSkeleton,
},
};

const ToggleTip = (
Expand Down

0 comments on commit baa5922

Please sign in to comment.