Skip to content
Merged
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
2 changes: 1 addition & 1 deletion packages/ui-checkbox/src/CheckboxGroup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type: example
name="sports2"
layout="inline"
messages={[
{ text: 'Invalid name', type: 'error' }
{ text: 'Invalid name', type: 'newError' }
]}
onChange={function (value) { console.log(value) }}
defaultValue={['soccer', 'volleyball']}
Expand Down
12 changes: 6 additions & 6 deletions packages/ui-color-picker/src/ColorPicker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,21 +218,21 @@ type: example
contrastAgainst,
renderContrastErrorMessage: (contrast, minContrast) => [
{
type: 'error',
type: 'newError',
text: `Not high enough contrast. Minimum required is ${minContrast}:1, current is ${contrast}:1`
}
]
}
}
renderInvalidColorMessage={(hexCode) => [
{
type: 'error',
type: 'newError',
text: `Not valid hex color. It should be either 3, 6 or 8 character long.`
}
]}
renderIsRequiredMessage={() => [
{
type: 'error',
type: 'newError',
text: `This field is required, please enter a valid hex code`
}
]}
Expand Down Expand Up @@ -334,17 +334,17 @@ type: example
{ type: "success", text: "I am a contrast success message" },
],
renderContrastErrorMessage: () => [
{ type: "error", text: "I am a contrast warning message" },
{ type: "newError", text: "I am a contrast warning message" },
],
}}
renderMessages={() => [
{ type: "hint", text: "I can display anything, at any time" },
]}
renderInvalidColorMessage={() => [
{ type: "error", text: "I am an invalid color message" },
{ type: "newError", text: "I am an invalid color message" },
]}
renderIsRequiredMessage={() => [
{ type: "error", text: "I am a required message" },
{ type: "newError", text: "I am a required message" },
]}
placeholderText="Enter HEX"
/>
Expand Down
4 changes: 2 additions & 2 deletions packages/ui-date-input/src/DateInput/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ class Example extends React.Component {
// could not be parsed and so the date is invalid
if (!selectedDate && value) {
return {
messages: [{ type: 'error', text: 'This date is invalid' }],
messages: [{ type: 'newError', text: 'This date is invalid' }],
}
}
// Display a message if the user has typed in a value that corresponds to a
// disabledDate
if (this.isDisabledDate(parseDate(selectedDate))) {
return {
messages: [{ type: 'error', text: 'This date is disabled' }],
messages: [{ type: 'newError', text: 'This date is disabled' }],
}
}
})
Expand Down
4 changes: 2 additions & 2 deletions packages/ui-date-input/src/DateInput2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,12 @@ const Example = () => {
// don't validate empty input
if (!utcIsoDate && inputValue.length > 0) {
setMessages([{
type: 'error',
type: 'newError',
text: 'This is not a valid date'
}])
} else if (date < new Date('1990-01-01')) {
setMessages([{
type: 'error',
type: 'newError',
text: 'Select date after January 1, 1990'
}])
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-file-drop/src/FileDrop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ type: example
accept=".jpg"
onDropAccepted={([file]) => { console.log(`File accepted ${file.name}`) }}
onDropRejected={([file]) => { console.log(`File rejected ${file.name}`) }}
messages={[{ text: 'Invalid file type', type: 'error' }]}
messages={[{ text: 'Invalid file type', type: 'newError' }]}
renderLabel={
<Billboard
size="small"
Expand Down
4 changes: 2 additions & 2 deletions packages/ui-form-field/src/FormFieldGroup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type: example
>
<TextInput renderLabel="Favorite Breakfast Eatery"
messages={[
{ text: 'Invalid name', type: 'error' }
{ text: 'Invalid name', type: 'newError' }
]}
/>
<TextInput renderLabel="Favorite Side Dish" />
Expand Down Expand Up @@ -80,7 +80,7 @@ type: example
layout="stacked"
rowSpacing="large"
messages={[
{ text: 'Complete All Fields', type: 'error' }
{ text: 'Complete All Fields', type: 'newError' }
]}
>
<RadioInputGroup
Expand Down
4 changes: 2 additions & 2 deletions packages/ui-number-input/src/NumberInput/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ const Example = () => {

const invalidNumber = (value) => {
setMessages([
{ text: `'${value}' is not a valid number.`, type: 'error' }
{ text: `'${value}' is not a valid number.`, type: 'newError' }
])
}

const required = () => {
setMessages([{ text: 'This is required.', type: 'error' }])
setMessages([{ text: 'This is required.', type: 'newError' }])
}

const toggleDisabled = (event) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-text-area/src/TextArea/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ A `TextArea` with errors:
---
type: example
---
<TextArea messages={[{ text: 'Invalid description', type: 'error' }]} label="Description" />
<TextArea messages={[{ text: 'Invalid description', type: 'newError' }]} label="Description" />
```

A disabled `TextArea`:
Expand Down
4 changes: 2 additions & 2 deletions packages/ui-text-input/src/TextInput/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type: example
messages: [
{
text: `Come on. There's no way your favorite band is really Supertramp.`,
type: 'error'
type: 'newError'
}
]
})
Expand Down Expand Up @@ -129,7 +129,7 @@ type: example
setMessages([
{
text: "Come on. There's no way your favorite band is really Supertramp.",
type: 'error'
type: 'newError'
}
])
}
Expand Down
Loading