Skip to content

Commit

Permalink
chore(admin): simplify @strapi imports (#10)
Browse files Browse the repository at this point in the history
* chore(admin): simplify `@strapi` imports

* chore(playground): remove plugin generated types
  • Loading branch information
ComfortablyCoding authored Oct 12, 2023
1 parent aca4f4d commit 1e91cc2
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 20 deletions.
14 changes: 7 additions & 7 deletions admin/src/components/NoteCreateModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import {
ModalBody,
ModalHeader,
ModalFooter,
} from '@strapi/design-system/ModalLayout';
import { TextInput } from '@strapi/design-system/TextInput';
import { Textarea } from '@strapi/design-system/Textarea';
import { Button } from '@strapi/design-system/Button';
import { Typography } from '@strapi/design-system/Typography';
import { Stack } from '@strapi/design-system/Stack';
import Check from '@strapi/icons/Check';
TextInput,
Textarea,
Button,
Typography,
Stack,
} from '@strapi/design-system';
import { Check } from '@strapi/icons';
import { useNote } from '../../hooks/useNote';

const NoteModalCreate = ({ toggleModal, note = {}, entity }) => {
Expand Down
8 changes: 2 additions & 6 deletions admin/src/components/NoteListItem/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Box } from '@strapi/design-system/Box';
import { Flex } from '@strapi/design-system/Flex';
import Trash from '@strapi/icons/Trash';
import Pencil from '@strapi/icons/Pencil';
import { Typography } from '@strapi/design-system/Typography';
import { IconButton, IconButtonGroup } from '@strapi/design-system/IconButton';
import { Box, Flex, Typography, IconButton, IconButtonGroup } from '@strapi/design-system';
import { Trash, Pencil } from '@strapi/icons';
import { useNote } from '../../hooks/useNote';

const NoteListItem = ({ note, setActiveNote, toggleModal }) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import { Stack } from '@strapi/design-system/Stack';
import { Stack } from '@strapi/design-system';
import { NoteModalCreate } from '../../../NoteCreateModal';
import { NoteListItem } from '../../../NoteListItem';
import { useNote } from '../../../../hooks/useNote';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import { TextButton } from '@strapi/design-system/TextButton';
import Plus from '@strapi/icons/Plus';
import { TextButton } from '@strapi/design-system';
import { Plus } from '@strapi/icons';
import { NoteModalCreate } from '../../../NoteCreateModal';
const NoteListLayoutFooter = ({ entity }) => {
const [isVisible, setIsVisible] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React from 'react';
import { Box } from '@strapi/design-system/Box';
import { Divider } from '@strapi/design-system/Divider';
import { Typography } from '@strapi/design-system/Typography';
import { Box, Divider, Typography } from '@strapi/design-system';

const NoteListLayoutHeader = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion admin/src/components/NoteListLayout/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useCMEditViewDataManager } from '@strapi/helper-plugin';
import { Box } from '@strapi/design-system/Box';
import { Box } from '@strapi/design-system';
import { NoteListLayoutHeader } from './components/NoteListLayoutHeader';
import { NoteListLayoutFooter } from './components/NoteListLayoutFooter';
import { NoteListLayoutContent } from './components/NoteListLayoutContent';
Expand Down

0 comments on commit 1e91cc2

Please sign in to comment.