Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: removed alias imports #78

Merged
merged 1 commit into from
Apr 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion generators/Component.tsx.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
{{#each typeImports}}
{{{this}}},
{{/each}}
} from '@/types'
} from '../types'

export type {{properCase name}}Props =
& {{htmlAttributesType}}<{{refType}}>
Expand Down
2 changes: 1 addition & 1 deletion generators/helpers/buildComponentData.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { colorOptions, htmlTagOptions } from '../options/index.js'
export const buildComponentData = (data) => {
data.twPrefix && data.twPrefix.toLowerCase()

// Add to import ___ from '@/types', props, spread props, and classes
// Add to import ___ from '../types', props, spread props, and classes
data.typeImports = []
data.propTypes = []
data.spreadProps = []
Expand Down
2 changes: 1 addition & 1 deletion src/Alert/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { forwardRef, ReactNode } from 'react'
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps, ComponentStatus } from '@/types'
import { IComponentBaseProps, ComponentStatus } from '../types'

export type AlertProps = React.HTMLAttributes<HTMLDivElement> &
IComponentBaseProps & {
Expand Down
2 changes: 1 addition & 1 deletion src/Artboard/Artboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { forwardRef, ReactNode } from 'react'
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

export type ArtboardProps = React.HTMLAttributes<HTMLDivElement> &
IComponentBaseProps & {
Expand Down
2 changes: 1 addition & 1 deletion src/Avatar/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
ComponentColor,
ComponentShape,
ComponentSize,
} from '@/types'
} from '../types'

export type AvatarProps = React.HTMLAttributes<HTMLDivElement> &
IComponentBaseProps & {
Expand Down
2 changes: 1 addition & 1 deletion src/Avatar/AvatarGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ReactElement } from 'react'
import clsx from 'clsx'

import { AvatarProps } from '@/Avatar'
import { AvatarProps } from '../Avatar'

type AvatarGroupProps = React.HTMLAttributes<HTMLDivElement> & {
children: ReactElement<AvatarProps>[]
Expand Down
2 changes: 1 addition & 1 deletion src/Badge/Badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { forwardRef, ReactNode } from 'react'
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps, ComponentColor, ComponentSize } from '@/types'
import { IComponentBaseProps, ComponentColor, ComponentSize } from '../types'

export type BadgeProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'color'> &
IComponentBaseProps & {
Expand Down
2 changes: 1 addition & 1 deletion src/Breadcrumbs/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ReactElement } from 'react'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

import BreadcrumbsItem, { BreadcrumbsItemProps } from './BreadcrumbsItem'

Expand Down
4 changes: 3 additions & 1 deletion src/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ const Template: Story<ButtonProps> = (args) => (
<Button {...args} />
)
export const Default = Template.bind({})
Default.args = {}
Default.args = {
children: 'Button'
}

export const Colors: Story<ButtonProps> = (args) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
ComponentColor,
ComponentShape,
ComponentSize,
} from '@/types'
} from '../types'

type ButtonBaseProps = IComponentBaseProps & {
shape?: ComponentShape
Expand Down
4 changes: 2 additions & 2 deletions src/ButtonGroup/ButtonGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { ReactElement } from 'react'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

import { ButtonProps } from '@/Button'
import { ButtonProps } from '../Button'

export type ButtonGroupProps = React.HTMLAttributes<HTMLDivElement> &
IComponentBaseProps & {
Expand Down
2 changes: 1 addition & 1 deletion src/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps, ComponentSize } from '@/types'
import { IComponentBaseProps, ComponentSize } from '../types'

import CardActions, { CardActionsProps as ActionProps } from './CardActions'
import CardBody, { CardBodyProps as BodyProps } from './CardBody'
Expand Down
2 changes: 1 addition & 1 deletion src/Card/CardActions.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import { twMerge } from 'tailwind-merge'
import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

export type CardActionsProps = React.HTMLAttributes<HTMLDivElement> &
IComponentBaseProps
Expand Down
2 changes: 1 addition & 1 deletion src/Card/CardBody.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import { twMerge } from 'tailwind-merge'
import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

export type CardBodyProps = React.HTMLAttributes<HTMLDivElement> &
IComponentBaseProps
Expand Down
2 changes: 1 addition & 1 deletion src/Card/CardTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { ElementType } from 'react'
import { twMerge } from 'tailwind-merge'
import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

export type CardTitleProps = React.HTMLAttributes<HTMLDivElement> &
IComponentBaseProps & {
Expand Down
2 changes: 1 addition & 1 deletion src/Carousel/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import React, {
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

import CarouselItem, { CarouselItemProps } from './CarouselItem'
import Button from '../Button'
Expand Down
2 changes: 1 addition & 1 deletion src/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
IComponentBaseProps,
ComponentBrandColors,
ComponentSize,
} from '@/types'
} from '../types'

export type CheckboxProps = Omit<
React.InputHTMLAttributes<HTMLInputElement>,
Expand Down
2 changes: 1 addition & 1 deletion src/CodeMockup/CodeMockup.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { forwardRef } from 'react'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'
import { CodeMockupLine } from './CodeMockupLine'

export type CodeMockupProps = React.HTMLAttributes<HTMLDivElement> &
Expand Down
2 changes: 1 addition & 1 deletion src/CodeMockup/CodeMockupLine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { forwardRef } from 'react'
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'

import { ComponentStatus, IComponentBaseProps } from '@/types'
import { ComponentStatus, IComponentBaseProps } from '../types'

export type CodeMockupLineProps = React.HTMLAttributes<HTMLPreElement> &
IComponentBaseProps & {
Expand Down
2 changes: 1 addition & 1 deletion src/Collapse/Collapse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

import CollapseTitle from './CollapseTitle'
import CollapseContent from './CollapseContent'
Expand Down
2 changes: 1 addition & 1 deletion src/Collapse/CollapseContent.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

export type CollapseContentProps = React.HTMLAttributes<HTMLDivElement> &
IComponentBaseProps
Expand Down
2 changes: 1 addition & 1 deletion src/Collapse/CollapseTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

export type CollapseTitleProps = React.HTMLAttributes<HTMLDivElement> &
IComponentBaseProps
Expand Down
2 changes: 1 addition & 1 deletion src/Countdown/Countdown.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

export type CountdownProps = React.HTMLAttributes<HTMLSpanElement> &
IComponentBaseProps & {
Expand Down
2 changes: 1 addition & 1 deletion src/Divider/Divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

export type DividerProps = React.HTMLAttributes<HTMLDivElement> &
IComponentBaseProps & {
Expand Down
2 changes: 1 addition & 1 deletion src/Drawer/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { ReactNode } from 'react'
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

export type DrawerProps = React.HTMLAttributes<HTMLDivElement> &
IComponentBaseProps & {
Expand Down
2 changes: 1 addition & 1 deletion src/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { ReactNode } from 'react'
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

import DropdownMenu from './DropdownMenu'
import DropdownItem from './DropdownItem'
Expand Down
2 changes: 1 addition & 1 deletion src/Dropdown/DropdownMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import { twMerge } from 'tailwind-merge'
import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

export type DropdownMenuProps = React.HTMLAttributes<HTMLUListElement> &
IComponentBaseProps
Expand Down
2 changes: 1 addition & 1 deletion src/Dropdown/DropdownToggle.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'

import { ComponentColor, ComponentSize, IComponentBaseProps } from '@/types'
import { ComponentColor, ComponentSize, IComponentBaseProps } from '../types'

import Button from '../Button'

Expand Down
2 changes: 1 addition & 1 deletion src/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

import FooterTitle from './FooterTitle'

Expand Down
2 changes: 1 addition & 1 deletion src/Form/Form.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

import Label from './Label'

Expand Down
2 changes: 1 addition & 1 deletion src/Form/Label.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

export type LabelProps = React.LabelHTMLAttributes<HTMLLabelElement> &
IComponentBaseProps & {
Expand Down
2 changes: 1 addition & 1 deletion src/Hero/Hero.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

import HeroContent from './HeroContent'
import HeroOverlay from './HeroOverlay'
Expand Down
2 changes: 1 addition & 1 deletion src/Hero/HeroContent.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

export type HeroContentProps = React.HTMLAttributes<HTMLDivElement> &
IComponentBaseProps
Expand Down
2 changes: 1 addition & 1 deletion src/Hero/HeroOverlay.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

export type HeroOverlayProps = React.HTMLAttributes<HTMLDivElement> &
IComponentBaseProps
Expand Down
2 changes: 1 addition & 1 deletion src/Indicator/Indicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { ReactNode } from 'react'
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

export type IndicatorProps = React.HTMLAttributes<HTMLDivElement> &
IComponentBaseProps & {
Expand Down
2 changes: 1 addition & 1 deletion src/Input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { forwardRef } from 'react'
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps, ComponentColor, ComponentSize } from '@/types'
import { IComponentBaseProps, ComponentColor, ComponentSize } from '../types'

export type InputProps = Omit<
React.InputHTMLAttributes<HTMLInputElement>,
Expand Down
2 changes: 1 addition & 1 deletion src/InputGroup/InputGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { forwardRef } from 'react'
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps, ComponentSize } from '@/types'
import { IComponentBaseProps, ComponentSize } from '../types'

export type InputGroupProps = React.LabelHTMLAttributes<HTMLLabelElement> &
IComponentBaseProps & {
Expand Down
2 changes: 1 addition & 1 deletion src/Kbd/Kbd.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { forwardRef } from 'react'
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps, ComponentSize } from '@/types'
import { IComponentBaseProps, ComponentSize } from '../types'

export type KbdProps = React.HTMLAttributes<HTMLElement> &
IComponentBaseProps & {
Expand Down
2 changes: 1 addition & 1 deletion src/Link/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { forwardRef } from 'react'
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps, ComponentColor } from '@/types'
import { IComponentBaseProps, ComponentColor } from '../types'

export type LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> &
IComponentBaseProps & {
Expand Down
2 changes: 1 addition & 1 deletion src/Mask/Mask.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

export type MaskProps = React.ImgHTMLAttributes<HTMLImageElement> &
IComponentBaseProps & {
Expand Down
2 changes: 1 addition & 1 deletion src/Menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps, ComponentSize } from '@/types'
import { IComponentBaseProps, ComponentSize } from '../types'

import MenuTitle, { MenuTitleProps as TitleProps } from './MenuTitle'
import MenuItem, { MenuItemProps as ItemProps } from './MenuItem'
Expand Down
2 changes: 1 addition & 1 deletion src/Menu/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

export type MenuItemProps = React.LiHTMLAttributes<HTMLLIElement> &
IComponentBaseProps & {
Expand Down
2 changes: 1 addition & 1 deletion src/Menu/MenuTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

export type MenuTitleProps = React.LiHTMLAttributes<HTMLLIElement> &
IComponentBaseProps
Expand Down
2 changes: 1 addition & 1 deletion src/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { forwardRef, ReactNode, useImperativeHandle } from 'react'
import clsx from 'clsx'
import { twMerge } from 'tailwind-merge'

import { IComponentBaseProps } from '@/types'
import { IComponentBaseProps } from '../types'

import Button from '../Button'

Expand Down
Loading