Skip to content

Commit

Permalink
feat(Drawer): refactor to tailwind
Browse files Browse the repository at this point in the history
  • Loading branch information
mainframev authored and DSil committed Sep 4, 2023
1 parent 2b61ffb commit a9342ef
Show file tree
Hide file tree
Showing 18 changed files with 192 additions and 677 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ describe("Drawer", () => {
expect(screen.getByTestId("test")).toBeInTheDocument();
expect(screen.getByText("content"));
});

it("should be able to toggle visibility", () => {
jest.useFakeTimers();
const { rerender } = render(<Drawer shown={false}>content</Drawer>);
Expand Down
15 changes: 2 additions & 13 deletions packages/orbit-components/src/Drawer/components/DrawerClose.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
import * as React from "react";
import styled from "styled-components";

import ButtonLink from "../../ButtonLink";
import Close from "../../icons/Close";
import defaultTheme from "../../defaultTheme";
import { left } from "../../utils/rtl";
import type { Props } from "./types";

const StyledDrawerClose = styled.div`
margin-${left}: ${({ theme }) => theme.orbit.spaceMedium};
`;

StyledDrawerClose.defaultProps = {
theme: defaultTheme,
};

const DrawerClose = React.forwardRef<HTMLButtonElement, Props>(({ onClick, title }, ref) => {
return (
<StyledDrawerClose>
<div className="ms-md">
<ButtonLink onClick={onClick} iconLeft={<Close />} ref={ref} type="secondary" title={title} />
</StyledDrawerClose>
</div>
);
});

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions packages/orbit-components/src/Drawer/helpers/getPosition.ts

This file was deleted.

This file was deleted.

0 comments on commit a9342ef

Please sign in to comment.