mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-21 05:02:39 +08:00
add space above back button in recently opened
This commit is contained in:
parent
a5e84d46fc
commit
2986446ce9
@ -60,6 +60,10 @@ const ActionRow = styled(ResultRow)({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const BackActionRow = styled(ActionRow)({
|
||||||
|
marginTop: 8,
|
||||||
|
});
|
||||||
|
|
||||||
const ActionLabel = styled.span(({ theme }) => ({
|
const ActionLabel = styled.span(({ theme }) => ({
|
||||||
flexGrow: 1,
|
flexGrow: 1,
|
||||||
color: theme.color.mediumdark,
|
color: theme.color.mediumdark,
|
||||||
@ -196,7 +200,7 @@ export const SearchResults: FunctionComponent<{
|
|||||||
{results.map((result: DownshiftItem, index) => {
|
{results.map((result: DownshiftItem, index) => {
|
||||||
if (isCloseType(result)) {
|
if (isCloseType(result)) {
|
||||||
return (
|
return (
|
||||||
<ActionRow
|
<BackActionRow
|
||||||
{...result}
|
{...result}
|
||||||
{...getItemProps({ key: index, index, item: result })}
|
{...getItemProps({ key: index, index, item: result })}
|
||||||
isHighlighted={highlightedIndex === index}
|
isHighlighted={highlightedIndex === index}
|
||||||
@ -204,7 +208,7 @@ export const SearchResults: FunctionComponent<{
|
|||||||
<ActionIcon icon="arrowleft" />
|
<ActionIcon icon="arrowleft" />
|
||||||
<ActionLabel>Back to components</ActionLabel>
|
<ActionLabel>Back to components</ActionLabel>
|
||||||
<ActionKey>ESC</ActionKey>
|
<ActionKey>ESC</ActionKey>
|
||||||
</ActionRow>
|
</BackActionRow>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (isClearType(result)) {
|
if (isClearType(result)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user