Skip to content

Commit

Permalink
remove accidental test data from text input example
Browse files Browse the repository at this point in the history
  • Loading branch information
LJKaski committed Jun 12, 2024
1 parent 77ccd84 commit 53f20ba
Showing 1 changed file with 2 additions and 57 deletions.
59 changes: 2 additions & 57 deletions src/core/Form/TextInput/TextInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,65 +28,10 @@ Examples:
Provide a descriptive `labelText` for the input

```js
import {
TextInput,
Tooltip,
Button,
Heading,
Text,
SpacingProvider
} from 'suomifi-ui-components';
import { TextInput } from 'suomifi-ui-components';
import React from 'react';

const exampleRef = React.createRef();

const labelTextForTooltipExample = 'TextInput with a tooltip';

<>
<TextInput labelText="First name" />;
<SpacingProvider
margins={{ textInput: { mb: 'xl' }, button: { margin: 's' } }}
>
<TextInput
onBlur={(event) => console.log(event.target.value)}
labelText="TextInput with visible label"
/>
<TextInput
onBlur={(event) => console.log(event.target.value)}
labelText="Test TextInput with hidden label and a visual placeholder"
labelMode="hidden"
visualPlaceholder="This input has a hidden label"
/>
<TextInput
onBlur={(event) => console.log(event.target.value)}
labelText="TextInput with hint text"
hintText="An example hint text"
/>
<Button>Rapurapurallaa</Button>
<TextInput
labelText="TextInput with optional text and ref"
optionalText="optional"
ref={exampleRef}
onChange={() => {
console.log(exampleRef.current);
}}
/>
<TextInput
labelText={labelTextForTooltipExample}
tooltipComponent={
<Tooltip
ariaToggleButtonLabelText={`${labelTextForTooltipExample}, additional information`}
ariaCloseButtonLabelText={`${labelTextForTooltipExample}, close additional information`}
>
<Heading variant="h5" as="h2">
Tooltip
</Heading>
<Text>Text content for the tooltip</Text>
</Tooltip>
}
/>
</SpacingProvider>
</>;
<TextInput labelText="First name" />;
```

### Hint text
Expand Down

0 comments on commit 53f20ba

Please sign in to comment.