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

Wyświetl plik

@ -452,8 +452,8 @@ const EditProfile: React.FC = () => {
{features.profileFields && ( {features.profileFields && (
<Streamfield <Streamfield
labelText={<FormattedMessage id='edit_profile.fields.meta_fields_label' defaultMessage='Profile fields' />} label={<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 }} />} 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 || []} values={data.fields_attributes || []}
onChange={handleFieldsChange} onChange={handleFieldsChange}
onAddItem={handleAddField} onAddItem={handleAddField}