Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ propComponents: ['TextInput', 'TextInputExpandedObj']
---

import { useRef, useState } from 'react';
import CalendarIcon from '@patternfly/react-icons/dist/esm/icons/calendar-icon';
import RhUiCalendarFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-calendar-fill-icon';
import ClockIcon from '@patternfly/react-icons/dist/esm/icons/clock-icon';

## Examples
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from 'react';
import { TextInput } from '@patternfly/react-core';
import CalendarIcon from '@patternfly/react-icons/dist/esm/icons/calendar-icon';
import RhUiCalendarFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-calendar-fill-icon';
import ClockIcon from '@patternfly/react-icons/dist/esm/icons/clock-icon';

export const TextInputCustomIcon: React.FunctionComponent = () => {
Expand All @@ -12,7 +12,7 @@ export const TextInputCustomIcon: React.FunctionComponent = () => {
<TextInput
value={calendar}
type="text"
customIcon={<CalendarIcon />}
customIcon={<RhUiCalendarFillIcon />}
onChange={(_event, value) => setCalendar(value)}
aria-label="text input example with calendar icon"
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from 'react';
import { TextInput, ValidatedOptions } from '@patternfly/react-core';
import CalendarIcon from '@patternfly/react-icons/dist/esm/icons/calendar-icon';
import RhUiCalendarFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-calendar-fill-icon';

export const TextInputCustomIconInvalid: React.FunctionComponent = () => {
const [calendar, setCalendar] = useState('');
Expand All @@ -11,7 +11,7 @@ export const TextInputCustomIconInvalid: React.FunctionComponent = () => {
value={calendar}
type="text"
validated={ValidatedOptions.error}
customIcon={<CalendarIcon />}
customIcon={<RhUiCalendarFillIcon />}
onChange={(_event, value) => setCalendar(value)}
aria-label="text input example with calendar icon"
/>
Expand Down
Loading