Skip to content

Commit

Permalink
feat: add Card
Browse files Browse the repository at this point in the history
  • Loading branch information
RiverTwilight committed Aug 6, 2021
1 parent c525a05 commit d770f89
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 11 deletions.
2 changes: 2 additions & 0 deletions dist/components/Card/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare const _default: import("styled-components").StyledComponent<"div", any, {}, never>;
export default _default;
2 changes: 1 addition & 1 deletion dist/index.cjs.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export { default as ActionBarMenu } from "./components/ActionBarMenu/index";
export { default as ActionBarSpace } from "./components/ActionBarSpace/index";
export { default as StatuBar } from "./components/StatuBar/index";
export { default as SearchBar } from "./components/SearchBar/index";
export { default as Card } from "./components/Card/index";
export { default as CogSharpIcon } from "./icons/cog-sharp.svg";
export { default as AirplaneIcon } from "./icons/airplane.svg";
export { default as HomeOutlineIcon } from "./icons/home-outline.svg";
export { default as WifiSharpIcon } from "./icons/wifi-sharp.svg";
Expand Down
2 changes: 1 addition & 1 deletion dist/index.esm.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions playground/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
BrowserRouter as Router,
Switch,
Route,
Link,
useHistory,
} from "react-router-dom";
import { Container } from "kindyle";
Expand All @@ -12,7 +11,6 @@ import Setting from "./page/setting";
import Header from "./components/Header.jsx";

const Main = () => {
let history = useHistory();
return (
<>
<Header />
Expand Down
16 changes: 13 additions & 3 deletions playground/src/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,35 @@ import {
ActionBar,
ActionBarMenu,
HomeOutlineIcon,
CogSharpIcon
} from "kindyle";
import React from "react";
import {
useHistory,
} from "react-router-dom";

export default () => {
let history = useHistory();

return (
<Navbar>
<StatuBar battery={86} deviceName="My Kindle" />
<ActionBar>
<ActionGroup>
<ActionItem>
<ActionItem onClick={()=>{
history.push('/')
}}>
<HomeOutlineIcon />
home
</ActionItem>
<ActionItem>
<ActionItem onClick={()=>{
history.goBack()
}}>
<ArrowBackSharpIcon />
BACK
</ActionItem>
<ActionItem>
<HomeOutlineIcon />
<CogSharpIcon />
settings
</ActionItem>
</ActionGroup>
Expand Down
5 changes: 3 additions & 2 deletions playground/src/page/home.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Typography, Button, ListItem, Dialog } from "kindyle";
import { Typography, Button, ListItem, Card } from "kindyle";

export default () => {
return (
Expand All @@ -25,7 +25,8 @@ export default () => {
second="Arthur Conan Doyle"
></ListItem>
<ListItem primary="尘埃落定" second="阿来著"></ListItem>
<h2>Dialog</h2>
<h2>Card</h2>
<Card>asdfkhjf</Card>
</Typography>
</>
);
Expand Down
1 change: 1 addition & 0 deletions src/components/ActionBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ import styled from "styled-components";
export default styled.div`
display: flex;
height: 50px;
padding: 2px 0;
`;
4 changes: 2 additions & 2 deletions src/components/Card/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from "styled-components";

export default styled.div`
flex: 2 4 auto;
width: 10px;
border: 3px solid #000;
border-radius: 7px;
`;
1 change: 1 addition & 0 deletions src/icons/cog-sharp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export { default as ActionBarMenu } from "./components/ActionBarMenu/index";
export { default as ActionBarSpace } from "./components/ActionBarSpace/index";
export { default as StatuBar } from "./components/StatuBar/index";
export { default as SearchBar } from "./components/SearchBar/index";
export { default as Card } from "./components/Card/index";

export { default as CogSharpIcon } from "./icons/cog-sharp.svg";
export { default as AirplaneIcon } from "./icons/airplane.svg";
export { default as HomeOutlineIcon } from "./icons/home-outline.svg";
export { default as WifiSharpIcon } from "./icons/wifi-sharp.svg";
Expand Down

1 comment on commit d770f89

@vercel
Copy link

@vercel vercel bot commented on d770f89 Aug 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.