mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix/16207/text component storybook (#16214)
This commit is contained in:
parent
c00749dcf7
commit
4581a3ac77
@ -269,6 +269,7 @@ import { Text } from '../../ui/component-library/text';
|
|||||||
<Text as="p">p</Text>
|
<Text as="p">p</Text>
|
||||||
<Text as="span">span</Text>
|
<Text as="span">span</Text>
|
||||||
<Text as="strong">strong</Text>
|
<Text as="strong">strong</Text>
|
||||||
|
<Text as="input" placeholder="input"></Text>
|
||||||
```
|
```
|
||||||
|
|
||||||
Renders the html:
|
Renders the html:
|
||||||
@ -288,6 +289,7 @@ Renders the html:
|
|||||||
<p>p</p>
|
<p>p</p>
|
||||||
<span>span</span>
|
<span>span</span>
|
||||||
<strong>strong</strong>
|
<strong>strong</strong>
|
||||||
|
<input placeholder="input" />
|
||||||
```
|
```
|
||||||
|
|
||||||
### Box Props
|
### Box Props
|
||||||
|
@ -259,12 +259,17 @@ export const Ellipsis = (args) => (
|
|||||||
|
|
||||||
export const As = (args) => (
|
export const As = (args) => (
|
||||||
<>
|
<>
|
||||||
{Object.values(ValidTags).map((tag) => (
|
{ValidTags.map((tag) => {
|
||||||
<div key={tag}>
|
if (tag === 'input') {
|
||||||
<Text {...args} as={tag}>
|
return <Text key={tag} {...args} as={tag} placeholder={tag} />;
|
||||||
{tag}
|
}
|
||||||
</Text>
|
return (
|
||||||
</div>
|
<div key={tag}>
|
||||||
))}
|
<Text {...args} as={tag}>
|
||||||
|
{tag}
|
||||||
|
</Text>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user