-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
285 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { CSSProp } from 'styled-components'; | ||
import { IGenerateThemeDesignForComponentProps } from '@/design/designFunctions/generateThemeDesignForComponent/generateThemeDesignForComponent'; | ||
|
||
export type IButtonProps = { | ||
size?: 'sm' | 'md' | 'lg'; | ||
wide?: boolean; | ||
children?: React.ReactNode; | ||
externalStyle?: CSSProp; | ||
disabled?: boolean; | ||
} & IGenerateThemeDesignForComponentProps; | ||
|
||
type ButtonHTML = React.ButtonHTMLAttributes<HTMLButtonElement>; | ||
type AnchorHTML = React.AnchorHTMLAttributes<HTMLAnchorElement>; | ||
|
||
// Using conditional type based on the 'as' prop | ||
export type IButton = IButtonProps & (({ as?: 'button' } & ButtonHTML) | ({ as: 'a' } & AnchorHTML)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as ComponentAndActionWrapper } from './ComponentAndActionWrapper'; |
37 changes: 37 additions & 0 deletions
37
src/components/molecules/FancyContent/FancyContent.style.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { styled } from 'styled-components'; | ||
|
||
import IStyledPrefixAndPicker from '@/interface/IStyledPrefixAndPicker.model'; | ||
import { TTheme } from '@/interface/TTheme'; | ||
import { IFancyContentProps } from './FancyContent'; | ||
|
||
// Define the types for the Wrapper component | ||
type TWrapper = IStyledPrefixAndPicker< | ||
IFancyContentProps, | ||
'flexDirection' | 'flexAlign' | 'flexJustify' | 'gapBetweenText' | 'gapBetweenIcon' | ||
>; | ||
|
||
// Define the Wrapper component | ||
export const Wrapper = styled.span<TWrapper & { theme: TTheme }>` | ||
display: flex; | ||
flex-direction: ${({ $flexDirection }) => $flexDirection || 'row'}; | ||
justify-content: ${({ $flexJustify }) => $flexJustify || 'center'}; | ||
align-items: ${({ $flexAlign }) => $flexAlign || 'center'}; | ||
gap: ${({ $gapBetweenIcon, theme }) => $gapBetweenIcon ?? theme.spacing.xs}; | ||
.content { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: flex-start; | ||
gap: ${({ $gapBetweenText, theme }) => $gapBetweenText ?? theme.spacing.xxs}; | ||
} | ||
`; | ||
|
||
type TOnlyTextWrapper = IStyledPrefixAndPicker<IFancyContentProps, 'flexDirection' | 'gapBetweenText' | 'flexAlign' | 'flexJustify'>; | ||
export const OnlyTextWrapper = styled.span<TOnlyTextWrapper & { theme: TTheme }>` | ||
display: flex; | ||
flex-direction: ${({ $flexDirection }) => $flexDirection || 'column'}; | ||
justify-content: ${({ $flexJustify }) => $flexJustify || 'center'}; | ||
align-items: ${({ $flexAlign }) => $flexAlign || 'flex-start'}; | ||
gap: ${({ $gapBetweenText, theme }) => $gapBetweenText ?? theme.spacing.xxs}; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as FancyContent } from './FancyContent'; |
2 changes: 1 addition & 1 deletion
2
src/components/molecules/FancyContent/utils/FancyContentIcon.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/components/molecules/FancyContent/utils/TFancyTextVariant.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { CSSProp } from 'styled-components'; | ||
import { TTypography } from '@/interface/TTypography'; | ||
|
||
type IFancyContentTextProps = { | ||
children?: React.ReactNode; | ||
bold?: boolean; | ||
className?: string; | ||
externalStyle?: CSSProp; | ||
}; | ||
|
||
type IFancyContentTextWithSizeProps = IFancyContentTextProps & { | ||
size?: 'sm' | 'md' | 'lg'; | ||
fontVariant?: never; | ||
}; | ||
|
||
type IFancyContentTextWithFontVariantProps = IFancyContentTextProps & { | ||
fontVariant?: TTypography; | ||
size?: never; | ||
}; | ||
|
||
/** | ||
* Represents the type definition for the `TTextProps` type. | ||
* This type is a combination of `IFancyContentTextProps` and either `IFancyContentTextWithFontVariantProps` or `IFancyContentTextWithSizeProps`. | ||
*/ | ||
export type TTextProps = IFancyContentTextProps & (IFancyContentTextWithFontVariantProps | IFancyContentTextWithSizeProps); |
4 changes: 2 additions & 2 deletions
4
src/components/molecules/FancyContentCard/FancyContentCard.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
src/components/molecules/FancyDropDownUL/FancyDropDownUL.style.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.