Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
fix(lsg): adjust list styles, fix demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexpeschel committed Dec 13, 2017
1 parent aee75e9 commit d0cdbf0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
27 changes: 14 additions & 13 deletions src/lsg/patterns/list/demo.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
import DemoContainer from '../demo-container';
import { IconName, IconRegistry } from '../icons';
import List, {ListItemProps} from './index';
import List, {Li, Ul} from './index';
import PatternListItem from '../pattern-list-item';
import * as React from 'react';

const ListItems: ListItemProps[] = [
{
active: true,
value: 'A'
},
{
value: 'B'
}
];

const ListDemo: React.StatelessComponent<{}> = (): JSX.Element => (
<DemoContainer title="List Demo">
<List items={ListItems} headline="Default List" />
<List headline="Default List">
<Ul>
<Li>
Item1
</Li>
<Li>
Item2
</Li>
</Ul>
</List>
<List headline="Pattern List">
<PatternListItem>Item1</PatternListItem>
<Ul>
<PatternListItem>Item1</PatternListItem>
</Ul>
</List>
<IconRegistry names={IconName}/>
</DemoContainer>
Expand Down
5 changes: 2 additions & 3 deletions src/lsg/patterns/list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@ interface StyledListItemProps {
}

export const Ul = styledComponents.ul`
padding: 0;
box-sizing: border-box;
padding: 0 0 0 15px;
margin: 0;
width: 100%;
`;

export const Li = styledComponents.li`
margin: 0 0 0 15px;
padding: 0;
line-height: 25px;
list-style: none;
${(props: StyledListItemProps) => (props.onClick ? 'cursor: pointer;' : '')}
Expand Down
2 changes: 1 addition & 1 deletion src/lsg/patterns/pattern-list-item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface PatternListItemProps {
icon?: string;
}

const StyledPatternListItem = styled.div`
const StyledPatternListItem = styled.li`
display: flex;
align-items: center;
cursor: default;
Expand Down

0 comments on commit d0cdbf0

Please sign in to comment.