-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compressed Fixes Round 1 #2338
Merged
Merged
Compressed Fixes Round 1 #2338
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c14d35d
More TS defs
e8f43f4
Added doc section for prepend/appends and fixed the stylings based on…
c256bdc
Fix up dark mode colors
09bfb8a
More TS defs
b30fc99
cl
36ac2ca
Reduce spacing when text is not alone
5947e6d
Inset focus ring for icon buttons
68cdff6
Add EuiButton to sibling spacer of EuiFormRow
2285cca
Fix EuiSuggest usage of append for status
f422f4a
cl
503e21a
Added border to readOnly inputs
48f021c
cl
ad89180
Merge branch 'master' into compressed-fixes-1
cchaos 69ce477
Merge branch 'master' into compressed-fixes-1
cchaos 9c42b43
Merge branch 'master' into compressed-fixes-1
cchaos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
import React, { Fragment, useState } from 'react'; | ||
|
||
import { | ||
EuiButtonEmpty, | ||
EuiButtonIcon, | ||
EuiFieldText, | ||
EuiIcon, | ||
EuiIconTip, | ||
EuiPopover, | ||
EuiSpacer, | ||
EuiSwitch, | ||
EuiText, | ||
EuiToolTip, | ||
} from '../../../../src/components'; | ||
|
||
export default () => { | ||
const [isCompressed, setCompressed] = useState(false); | ||
const [isDisabled, setDisabled] = useState(false); | ||
const [isReadOnly, setReadOnly] = useState(false); | ||
|
||
return ( | ||
<Fragment> | ||
<EuiSwitch | ||
label="compressed" | ||
checked={isCompressed} | ||
onChange={e => setCompressed(e.target.checked)} | ||
/> | ||
  | ||
<EuiSwitch | ||
label="disabled" | ||
checked={isDisabled} | ||
onChange={e => setDisabled(e.target.checked)} | ||
/> | ||
  | ||
<EuiSwitch | ||
label="readOnly" | ||
checked={isReadOnly} | ||
onChange={e => setReadOnly(e.target.checked)} | ||
/> | ||
<EuiSpacer /> | ||
<EuiFieldText | ||
placeholder="String & text in a tooltip" | ||
prepend="String" | ||
append={ | ||
<EuiToolTip content="content"> | ||
<EuiText size="s">Tooltip</EuiText> | ||
</EuiToolTip> | ||
} | ||
compressed={isCompressed} | ||
disabled={isDisabled} | ||
readOnly={isReadOnly} | ||
/> | ||
<EuiSpacer /> | ||
<EuiFieldText | ||
placeholder="XS empty button in a popover & tooltip" | ||
prepend={ | ||
<EuiPopover | ||
button={ | ||
<EuiButtonEmpty size="xs" iconType="arrowDown" iconSide="right"> | ||
Popover | ||
</EuiButtonEmpty> | ||
} | ||
closePopover={() => {}} | ||
/> | ||
} | ||
append={ | ||
<EuiToolTip content="content"> | ||
<EuiButtonEmpty size="xs">Tooltip</EuiButtonEmpty> | ||
</EuiToolTip> | ||
} | ||
compressed={isCompressed} | ||
disabled={isDisabled} | ||
readOnly={isReadOnly} | ||
/> | ||
<EuiSpacer /> | ||
<EuiFieldText | ||
placeholder="XS empty buttons with icons" | ||
prepend={ | ||
<EuiButtonEmpty size="xs" iconType="arrowDown" iconSide="right"> | ||
<EuiIcon type="calendar" /> | ||
</EuiButtonEmpty> | ||
} | ||
append={ | ||
<EuiButtonEmpty size="xs" iconType="gear"> | ||
Tooltip | ||
</EuiButtonEmpty> | ||
} | ||
compressed={isCompressed} | ||
disabled={isDisabled} | ||
readOnly={isReadOnly} | ||
/> | ||
<EuiSpacer /> | ||
<EuiFieldText | ||
placeholder="Icon & button icon" | ||
prepend={<EuiIcon type="vector" />} | ||
append={<EuiButtonIcon iconType="gear" aria-label="Gear this" />} | ||
compressed={isCompressed} | ||
disabled={isDisabled} | ||
readOnly={isReadOnly} | ||
/> | ||
<EuiSpacer /> | ||
<EuiFieldText | ||
placeholder="Icons in buttons and popovers and tooltips" | ||
prepend={[ | ||
<EuiIcon type="vector" />, | ||
<EuiButtonIcon iconType="gear" aria-label="Gear this" />, | ||
]} | ||
append={[ | ||
<EuiPopover | ||
button={<EuiButtonIcon iconType="gear" aria-label="Gear this" />} | ||
closePopover={() => {}} | ||
/>, | ||
<EuiIconTip content="content" />, | ||
]} | ||
compressed={isCompressed} | ||
disabled={isDisabled} | ||
readOnly={isReadOnly} | ||
/> | ||
<EuiSpacer /> | ||
<EuiFieldText | ||
placeholder="Icon button in popover & tooltip" | ||
append={ | ||
<EuiPopover | ||
button={<EuiButtonIcon iconType="arrowDown" aria-label="Popover" />} | ||
closePopover={() => {}} | ||
/> | ||
} | ||
prepend={ | ||
<EuiToolTip content="content"> | ||
<EuiButtonIcon iconType="gear" aria-label="Gear this" /> | ||
</EuiToolTip> | ||
} | ||
compressed={isCompressed} | ||
disabled={isDisabled} | ||
readOnly={isReadOnly} | ||
/> | ||
<EuiSpacer /> | ||
<EuiFieldText | ||
placeholder="Icon and string & string and icon button" | ||
prepend={[<EuiIcon type="vector" />, 'String']} | ||
append={[ | ||
'String', | ||
<EuiButtonIcon iconType="gear" aria-label="Gear this" />, | ||
]} | ||
compressed={isCompressed} | ||
disabled={isDisabled} | ||
readOnly={isReadOnly} | ||
/> | ||
<EuiSpacer /> | ||
<EuiFieldText | ||
placeholder="String and button icon in tooltip & button icon in popover and string " | ||
prepend={[ | ||
'String', | ||
<EuiToolTip content="content"> | ||
<EuiButtonIcon iconType="gear" aria-label="Gear this" /> | ||
</EuiToolTip>, | ||
]} | ||
append={[ | ||
<EuiPopover | ||
button={<EuiButtonIcon iconType="gear" aria-label="Gear this" />} | ||
closePopover={() => {}} | ||
/>, | ||
'String', | ||
]} | ||
compressed={isCompressed} | ||
disabled={isDisabled} | ||
readOnly={isReadOnly} | ||
/> | ||
</Fragment> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hooks like whaaat!?! 😜