Skip to content

Commit

Permalink
Use smaller and compressed varients of buttons and form components (#421
Browse files Browse the repository at this point in the history
) (#424)

* Use EuiSmallButton



* Use EuiSmallButtonIcon



* Use EuiSmallButtonEmpty



* Use EuiCompressedFormRow



* Use EuiCompressedField*



* Use EuiCompressedSelect and EuiCompressedSuperSelect



* Use EuiCompressedComboBox



* Update snapshots and tests



---------


(cherry picked from commit 1a3157b)

Signed-off-by: Miki <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Aug 9, 2024
1 parent c5c3195 commit 6db16bb
Show file tree
Hide file tree
Showing 9 changed files with 2,047 additions and 1,727 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


import {
EuiButtonIcon,
EuiSmallButtonIcon,
EuiDescriptionList,
EuiDescriptionListDescription,
EuiDescriptionListTitle,
Expand Down Expand Up @@ -53,7 +53,7 @@ export const ResultGridComponent = ({
<td className="osdDocTableCell__toggleDetails" key={uniqueId('grid-td-')}>
<EuiPopover
button={
<EuiButtonIcon
<EuiSmallButtonIcon
aria-label="Toggle details"
className="euiButtonIcon euiButtonIcon--text"
iconType={isResultDetailOpen ? 'minimize' : 'expand'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ exports[`Search bar component Renders search bar component 1`] = `
<div
className="euiFlexItem"
>
<EuiFieldSearch
<EuiCompressedFieldSearch
aria-label="Enter your Search query"
compressed={false}
compressed={true}
fullWidth={true}
id="searchRelevance-searchBar"
incremental={false}
Expand All @@ -42,21 +42,21 @@ exports[`Search bar component Renders search bar component 1`] = `
"onClick": [Function],
}
}
compressed={false}
compressed={true}
fullWidth={true}
icon="search"
isLoading={false}
>
<div
className="euiFormControlLayout euiFormControlLayout--fullWidth"
className="euiFormControlLayout euiFormControlLayout--fullWidth euiFormControlLayout--compressed"
>
<div
className="euiFormControlLayout__childrenWrapper"
>
<EuiValidatableControl>
<input
aria-label="Enter your Search query"
className="euiFieldSearch euiFieldSearch--fullWidth euiFieldSearch-isClearable"
className="euiFieldSearch euiFieldSearch--fullWidth euiFieldSearch--compressed euiFieldSearch-isClearable"
id="searchRelevance-searchBar"
onChange={[Function]}
onKeyUp={[Function]}
Expand All @@ -71,15 +71,15 @@ exports[`Search bar component Renders search bar component 1`] = `
"onClick": [Function],
}
}
compressed={false}
compressed={true}
icon="search"
isLoading={false}
>
<div
className="euiFormControlLayoutIcons"
>
<EuiFormControlLayoutCustomIcon
size="m"
size="s"
type="search"
>
<span
Expand All @@ -88,19 +88,19 @@ exports[`Search bar component Renders search bar component 1`] = `
<EuiIcon
aria-hidden="true"
className="euiFormControlLayoutCustomIcon__icon"
size="m"
size="s"
type="search"
>
<EuiIconBeaker
aria-hidden={true}
className="euiIcon euiIcon--medium euiIcon-isLoading euiFormControlLayoutCustomIcon__icon"
className="euiIcon euiIcon--small euiIcon-isLoading euiFormControlLayoutCustomIcon__icon"
focusable="false"
role="img"
style={null}
>
<svg
aria-hidden={true}
className="euiIcon euiIcon--medium euiIcon-isLoading euiFormControlLayoutCustomIcon__icon"
className="euiIcon euiIcon--small euiIcon-isLoading euiFormControlLayoutCustomIcon__icon"
focusable="false"
height={16}
role="img"
Expand All @@ -123,15 +123,15 @@ exports[`Search bar component Renders search bar component 1`] = `
>
<EuiFormControlLayoutClearButton
onClick={[Function]}
size="m"
size="s"
>
<EuiI18n
default="Clear input"
token="euiFormControlLayoutClearButton.label"
>
<button
aria-label="Clear input"
className="euiFormControlLayoutClearButton"
className="euiFormControlLayoutClearButton euiFormControlLayoutClearButton--small"
onClick={[Function]}
type="button"
>
Expand Down Expand Up @@ -171,7 +171,7 @@ exports[`Search bar component Renders search bar component 1`] = `
</div>
</div>
</EuiFormControlLayout>
</EuiFieldSearch>
</EuiCompressedFieldSearch>
</div>
</EuiFlexItem>
<EuiFlexItem
Expand All @@ -180,55 +180,63 @@ exports[`Search bar component Renders search bar component 1`] = `
<div
className="euiFlexItem euiFlexItem--flexGrowZero"
>
<EuiButton
<EuiSmallButton
aria-label="searchRelevance-searchButton"
fill={true}
onClick={[Function]}
>
<EuiButtonDisplay
<EuiButton
aria-label="searchRelevance-searchButton"
baseClassName="euiButton"
disabled={false}
element="button"
fill={true}
isDisabled={false}
onClick={[Function]}
type="button"
size="s"
>
<button
<EuiButtonDisplay
aria-label="searchRelevance-searchButton"
className="euiButton euiButton--primary euiButton--fill"
baseClassName="euiButton"
disabled={false}
element="button"
fill={true}
isDisabled={false}
onClick={[Function]}
style={
Object {
"minWidth": undefined,
}
}
size="s"
type="button"
>
<EuiButtonContent
className="euiButton__content"
iconSide="left"
textProps={
<button
aria-label="searchRelevance-searchButton"
className="euiButton euiButton--primary euiButton--small euiButton--fill"
disabled={false}
onClick={[Function]}
style={
Object {
"className": "euiButton__text",
"minWidth": undefined,
}
}
type="button"
>
<span
className="euiButtonContent euiButton__content"
<EuiButtonContent
className="euiButton__content"
iconSide="left"
textProps={
Object {
"className": "euiButton__text",
}
}
>
<span
className="euiButton__text"
className="euiButtonContent euiButton__content"
>
Search
<span
className="euiButton__text"
>
Search
</span>
</span>
</span>
</EuiButtonContent>
</button>
</EuiButtonDisplay>
</EuiButton>
</EuiButtonContent>
</button>
</EuiButtonDisplay>
</EuiButton>
</EuiSmallButton>
</div>
</EuiFlexItem>
</div>
Expand Down
Loading

0 comments on commit 6db16bb

Please sign in to comment.