Skip to content

Commit

Permalink
🎨 chore: remove styled-components
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Oct 20, 2023
1 parent df815fc commit cb2eb56
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 29 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@
"react-dom": "^18",
"semantic-release": "^21",
"semantic-release-config-gitmoji": "^1",
"styled-components": "^6.1.0",
"stylelint": "^15",
"typescript": "^5",
"vitest": "latest"
Expand Down
14 changes: 4 additions & 10 deletions src/ChatInputArea/demos/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@ import { ActionIcon, ChatInputArea, DraggablePanel, Icon, TokenTag } from '@ant-
import { Button } from 'antd';
import { Archive, Eraser, Languages } from 'lucide-react';
import { useState } from 'react';
import styled from 'styled-components';

const View = styled.div`
position: relative;
display: flex;
flex-direction: column;
height: 400px;
`;
import { Flexbox } from 'react-layout-kit';

export default () => {
const [expand, setExpand] = useState<boolean>(false);

return (
<View>
<Flexbox height={400}>
<div style={{ flex: 1 }}></div>
<DraggablePanel expandable={false} fullscreen={expand} minHeight={200} placement="bottom">
<ChatInputArea
Expand All @@ -31,6 +25,6 @@ export default () => {
onExpandChange={setExpand}
/>
</DraggablePanel>
</View>
</Flexbox>
);
};
24 changes: 6 additions & 18 deletions src/DraggablePanel/demos/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,13 @@ import {
DraggablePanelHeader,
} from '@ant-design/pro-chat';
import { useState } from 'react';
import styled from 'styled-components';

const View = styled.div`
position: relative;
display: flex;
width: 100%;
height: 100%;
min-height: 500px;
`;

const Container = styled.div`
padding: 24px;
`;
import { Flexbox } from 'react-layout-kit';

export default () => {
const [expand, setExpand] = useState(true);
const [pin, setPin] = useState(true);
return (
<View>
<Flexbox style={{ minHeight: 500 }} width={'100%'} height={'100%'}>
<DraggablePanel
expand={expand}
mode={pin ? 'fixed' : 'float'}
Expand All @@ -50,7 +36,9 @@ export default () => {
<DraggablePanelFooter>Footer</DraggablePanelFooter>
</DraggablePanelContainer>
</DraggablePanel>
<Container style={{ flex: 1 }}>Content</Container>
</View>
<Flexbox padding={24} style={{ flex: 1 }}>
Content
</Flexbox>
</Flexbox>
);
};

0 comments on commit cb2eb56

Please sign in to comment.