fix(my-joy-beta): s/Snapshot key/Snapshot name

This commit is contained in:
Sérgio Ramos 2018-02-22 00:01:07 +00:00
parent ffe9d2321c
commit b5a29eb300
2 changed files with 13 additions and 2 deletions

View File

@ -86,6 +86,7 @@ export const AddForm = props => (
method="create" method="create"
input="input" input="input"
type="snapshot" type="snapshot"
typeLabel="name"
expanded expanded
onlyName onlyName
noRemove noRemove

View File

@ -111,12 +111,20 @@ const TextareaKeyValue = ({
</Fragment> </Fragment>
); );
const InputKeyValue = ({ type, submitting, onlyName, onlyValue }) => ( const InputKeyValue = ({
type,
submitting,
typeLabel,
onlyName,
onlyValue
}) => (
<Flex wrap justifyStart contentStretch> <Flex wrap justifyStart contentStretch>
{!onlyValue ? ( {!onlyValue ? (
<FlexItem basis="auto"> <FlexItem basis="auto">
<FormGroup name="name" field={Field} fluid> <FormGroup name="name" field={Field} fluid>
<FormLabel>{titleCase(type)} key</FormLabel> <FormLabel>
{titleCase(type)} {typeLabel}
</FormLabel>
<Margin top={0.5}> <Margin top={0.5}>
<Input onBlur={null} type="text" disabled={submitting} /> <Input onBlur={null} type="text" disabled={submitting} />
</Margin> </Margin>
@ -145,6 +153,7 @@ export const KeyValue = ({
disabled = false, disabled = false,
input = 'input', input = 'input',
type = 'metadata', type = 'metadata',
typeLabel = 'key',
method = 'add', method = 'add',
initialValues = {}, initialValues = {},
error = null, error = null,
@ -226,6 +235,7 @@ export const KeyValue = ({
<InputKeyValue <InputKeyValue
onBlur={null} onBlur={null}
type={type} type={type}
typeLabel={typeLabel}
submitting={submitting} submitting={submitting}
onlyName={onlyName} onlyName={onlyName}
onlyValue={onlyValue} onlyValue={onlyValue}