Skip to content

Commit 23e1d85

Browse files
committed
chore(@clayui/form): LPD-53483 Add storybook example of ClayInput.InlineText
1 parent e6e165b commit 23e1d85

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

packages/clay-form/stories/Input.stories.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
* SPDX-License-Identifier: BSD-3-Clause
44
*/
55

6+
import classNames from 'classnames';
67
import React from 'react';
78

89
import {ClayInput} from '../src';
910
import ClayForm from '../src/Form';
1011

12+
1113
export default {
1214
argTypes: {
1315
sizing: {
@@ -86,3 +88,29 @@ Textarea.args = {
8688
readOnly: false,
8789
sizing: undefined,
8890
};
91+
92+
export const InlineText = (args: any) => (
93+
<div className="sheet">
94+
<ClayForm.Group
95+
className={classNames({
96+
['has-error']: args.hasError,
97+
['has-success']: args.hasSuccess,
98+
['has-warning']: args.hasWarning,
99+
})}
100+
>
101+
<label htmlFor="inlineText">Inline Text Example</label>
102+
<ClayInput.InlineText
103+
id="inlineText"
104+
placeholder="Untitled Case Study"
105+
readOnly={args.readOnly}
106+
/>
107+
</ClayForm.Group>
108+
</div>
109+
);
110+
111+
InlineText.args = {
112+
hasError: false,
113+
hasSuccess: false,
114+
hasWarning: false,
115+
readOnly: false,
116+
};

0 commit comments

Comments
 (0)