Skip to content

Commit

Permalink
fix: block expand styling
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Jun 20, 2020
1 parent ff79712 commit fe1f105
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 5 additions & 6 deletions ui/components/src/BlockContainer/BlockContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @jsx jsx */
import React, { FC } from 'react';
import { jsx, Flex, Link, Divider, Box, SxStyleProp } from 'theme-ui';
import { jsx, Flex, Link, Divider, Box, SxStyleProp, Text } from 'theme-ui';
import Octicon, {
LinkIcon,
ChevronRightIcon,
Expand Down Expand Up @@ -86,12 +86,11 @@ export const BlockContainer: FC<BlockContainerProps> = ({
}}
onClick={() => setIsOpen(!isOpen)}
>
<Flex sx={{ flexDirection: 'row', alignItems: 'center' }}>
<Flex variant="blockcontainer.titleblock">
<BlockTitle />
<Octicon
sx={{ ml: 2 }}
icon={isOpen ? ChevronDownIcon : ChevronRightIcon}
/>
<Text variant="blockcontainer.expandicon">
<Octicon icon={isOpen ? ChevronDownIcon : ChevronRightIcon} />
</Text>
</Flex>
</Link>
)}
Expand Down
4 changes: 3 additions & 1 deletion ui/components/src/ThemeContext/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const theme: ControlsTheme = {
shadow: 'rgba(0, 0, 0, 0.1)',
modes: {
dark: {
primary: '#9c6ade',
primary: '#d5c0f1',
secondary: '#b4e1fa',
highlight: '#b7ecec',
muted: '#e6e6e6',
Expand Down Expand Up @@ -294,6 +294,8 @@ export const theme: ControlsTheme = {
visibility: 'visible',
},
},
titleblock: { flexDirection: 'row', alignItems: 'center' },
expandicon: { ml: 2, pb: 2 },
},
blockpagecontainer: {
container: {},
Expand Down

0 comments on commit fe1f105

Please sign in to comment.