Streamfield: labelText, hintText --> label, hint

api-accept
Alex Gleason 2022-05-05 14:57:19 -05:00
rodzic 0f341eee6e
commit 9bd18b13bd
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 8 dodań i 8 usunięć

Wyświetl plik

@ -22,9 +22,9 @@ interface IStreamfield {
/** Array of values for the streamfield. */
values: any[],
/** Input label message. */
labelText?: React.ReactNode,
label?: React.ReactNode,
/** Input hint message. */
hintText?: React.ReactNode,
hint?: React.ReactNode,
/** Callback to add an item. */
onAddItem?: () => void,
/** Callback to remove an item by index. */
@ -40,8 +40,8 @@ interface IStreamfield {
/** List of inputs that can be added or removed. */
const Streamfield: React.FC<IStreamfield> = ({
values,
labelText,
hintText,
label,
hint,
onAddItem,
onRemoveItem,
onChange,
@ -61,8 +61,8 @@ const Streamfield: React.FC<IStreamfield> = ({
return (
<Stack space={4}>
<Stack>
{labelText && <Text size='sm' weight='medium'>{labelText}</Text>}
{hintText && <Text size='xs' theme='muted'>{hintText}</Text>}
{label && <Text size='sm' weight='medium'>{label}</Text>}
{hint && <Text size='xs' theme='muted'>{hint}</Text>}
</Stack>
<Stack>

Wyświetl plik

@ -452,8 +452,8 @@ const EditProfile: React.FC = () => {
{features.profileFields && (
<Streamfield
labelText={<FormattedMessage id='edit_profile.fields.meta_fields_label' defaultMessage='Profile fields' />}
hintText={<FormattedMessage id='edit_profile.hints.meta_fields' defaultMessage='You can have up to {count, plural, one {# custom field} other {# custom fields}} displayed on your profile.' values={{ count: maxFields }} />}
label={<FormattedMessage id='edit_profile.fields.meta_fields_label' defaultMessage='Profile fields' />}
hint={<FormattedMessage id='edit_profile.hints.meta_fields' defaultMessage='You can have up to {count, plural, one {# custom field} other {# custom fields}} displayed on your profile.' values={{ count: maxFields }} />}
values={data.fields_attributes || []}
onChange={handleFieldsChange}
onAddItem={handleAddField}