fix: editable header width (#318)

This commit is contained in:
Kristin Aoki
2023-04-26 09:13:04 -04:00
committed by GitHub
parent 8676ba257c
commit 21841fe09f
6 changed files with 6 additions and 17 deletions

View File

@@ -45,7 +45,7 @@ exports[`EditorContainer component render snapshot: initialized. enable save and
className="d-flex flex-row justify-content-between"
>
<h2
className="h3 d-flex flex-row align-items-center"
className="h3 col pl-0"
>
<injectIntl(ShimmedIntlComponent)
isInitialized={true}
@@ -126,7 +126,7 @@ exports[`EditorContainer component render snapshot: not initialized. disable sav
className="d-flex flex-row justify-content-between"
>
<h2
className="h3 d-flex flex-row align-items-center"
className="h3 col pl-0"
>
<injectIntl(ShimmedIntlComponent)
isInitialized={false}

View File

@@ -12,10 +12,7 @@ export const EditableHeader = ({
localTitle,
cancelEdit,
}) => (
<Form.Group
style={{ width: '90%' }}
onBlur={(e) => updateTitle(e)}
>
<Form.Group onBlur={(e) => updateTitle(e)}>
<Form.Control
style={{ paddingInlineEnd: 'calc(1rem + 84px)' }}
autoFocus

View File

@@ -3,11 +3,6 @@
exports[`EditableHeader snapshot snapshot 1`] = `
<Form.Group
onBlur={[Function]}
style={
Object {
"width": "90%",
}
}
>
<Form.Control
autoFocus={true}

View File

@@ -12,7 +12,7 @@ exports[`TitleHeader snapshots editing 1`] = `
exports[`TitleHeader snapshots initialized 1`] = `
<div
className="d-flex flex-row align-items-center"
className="d-flex flex-row align-items-center mt-1"
>
<Truncate>
<Component />

View File

@@ -46,7 +46,7 @@ export const TitleHeader = ({
);
}
return (
<div className="d-flex flex-row align-items-center">
<div className="d-flex flex-row align-items-center mt-1">
<Truncate>
{title}
</Truncate>

View File

@@ -48,12 +48,9 @@ export const EditorContainer = ({
</BaseModal>
<ModalDialog.Header className="shadow-sm zindex-10">
<div className="d-flex flex-row justify-content-between">
<h2
className="h3 d-flex flex-row align-items-center"
>
<h2 className="h3 col pl-0">
<TitleHeader isInitialized={isInitialized} />
</h2>
<IconButton
src={Close}
iconAs={Icon}