Support readonly flag in URLProperty. (#1041)

This commit is contained in:
kamre 2021-08-24 13:32:42 +07:00 committed by GitHub
parent fb2410f430
commit 22bfe2da13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -11,6 +11,7 @@ import LinkIcon from '../../../widgets/icons/Link'
type Props = {
value: string
readonly?: boolean
onChange: (value: string) => void
onSave: () => void
onCancel: () => void
@ -39,6 +40,7 @@ const URLProperty = (props: Props): JSX.Element => {
className='octo-propertyvalue'
placeholderText=''
value={props.value}
readonly={props.readonly}
onChange={props.onChange}
onSave={props.onSave}
onCancel={props.onCancel}

View file

@ -208,6 +208,7 @@ const PropertyValueElement = (props:Props): JSX.Element => {
return (
<URLProperty
value={value as string}
readonly={readOnly}
onChange={setValue}
onSave={saveTextProperty}
onCancel={() => setValue(propertyValue)}