Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
8d86087
chore: kanban refactoring
gurusainath Sep 4, 2023
e9b6f86
Merge branch 'develop' of gurusainath:makeplane/plane into fix/kanaba…
gurusainath Sep 4, 2023
9d334cf
Merge branch 'develop' of gurusainath:makeplane/plane into fix/kanaba…
gurusainath Sep 4, 2023
731309a
Merge branch 'develop' of gurusainath:makeplane/plane into fix/kanaba…
gurusainath Sep 5, 2023
ef630ef
chore: Implemented new kanaban board UX and implemented draggable usi…
gurusainath Sep 5, 2023
15ef2bc
Merge branch 'develop' of gurusainath:makeplane/plane into fix/kanaba…
gurusainath Sep 6, 2023
b86c30b
chore: updated yarn lock
gurusainath Sep 6, 2023
7c5936e
Merge branch 'develop' of gurusainath:makeplane/plane into fix/kanban…
gurusainath Sep 7, 2023
b9a6a00
chore: updated the store for issues and issue filters
gurusainath Sep 8, 2023
aef71fb
Merge branch 'develop' of gurusainath:makeplane/plane into fix/kanban…
gurusainath Sep 8, 2023
8c04e77
chore: resolved build error
gurusainath Sep 8, 2023
c0e3c81
Merge branch 'develop' of gurusainath:makeplane/plane into fix/kanban…
gurusainath Sep 11, 2023
0445c61
chore: created filters and updated the issue filters, display_filter …
gurusainath Sep 12, 2023
a8c5a41
Merge branch 'develop' of gurusainath:makeplane/plane into fix/kanban…
gurusainath Sep 12, 2023
0424280
Merge branch 'develop' of gurusainath:makeplane/plane into fix/kanban…
gurusainath Sep 12, 2023
3b85444
chore: implemented filters for issues
gurusainath Sep 12, 2023
834e672
chore: UI theming updates
gurusainath Sep 12, 2023
ada1bc0
Merge branch 'develop' of gurusainath:makeplane/plane into fix/kanban…
gurusainath Sep 12, 2023
698021a
chore: handled single and multi select in filter cards
gurusainath Sep 12, 2023
0ec0ad6
chore: implemented filters and views in kanaban
gurusainath Sep 13, 2023
3ffbb6a
chore: updating filters, display_filter and display properties
gurusainath Sep 14, 2023
f579712
chore: merge conflict for lucide icons resolved
gurusainath Sep 14, 2023
c67f08f
chore: filter, layout, display filters, extra filters and display pro…
gurusainath Sep 14, 2023
60883ba
chore: clean up and resolved import warnings
gurusainath Sep 14, 2023
66022ea
chore: type check
gurusainath Sep 14, 2023
28ce96a
chore: renamed gantt key to gantt_chart
gurusainath Sep 14, 2023
3c9e62d
chore: filter render UI and Functionality implementation
gurusainath Sep 14, 2023
fce6907
chore: filter empty state handling in issue filter selection
gurusainath Sep 14, 2023
d88a088
Merge branch 'develop' of gurusainath:makeplane/plane into fix/kanban…
gurusainath Sep 15, 2023
9136258
Implementing list view
sriramveeraghanta Sep 15, 2023
7b04adf
chore: kanban drag drop logic
gurusainath Sep 15, 2023
cf34d4a
merge conflicts resolved
sriramveeraghanta Sep 15, 2023
cc9ebc5
Merge pull request #2195 from makeplane/fix/list-sorting
sriramveeraghanta Sep 15, 2023
f6d4ac9
Merge branch 'develop' of gurusainath:makeplane/plane into fix/kanban…
gurusainath Sep 15, 2023
e949031
Merge branch 'develop' of gurusainath:makeplane/plane into fix/kanban…
gurusainath Sep 15, 2023
70fe830
filtering
sriramveeraghanta Sep 15, 2023
12b6ec4
Merge pull request #2197 from makeplane/fix/list-sorting
sriramveeraghanta Sep 15, 2023
a25e5ac
chore: store setup
gurusainath Sep 15, 2023
12ce6e7
Merge branch 'develop' of gurusainath:makeplane/plane into fix/kanban…
gurusainath Sep 19, 2023
906caa6
chore: handled build issues
gurusainath Sep 19, 2023
4915926
chore: store setup
gurusainath Sep 20, 2023
50c330d
conflicts
gurusainath Sep 20, 2023
908f671
user filter
gurusainath Sep 20, 2023
a328c53
chore: store setup
sriramveeraghanta Sep 20, 2023
e96bc77
chore: fixing up store
sriramveeraghanta Sep 20, 2023
6d52801
chore: store fixes and static data setup
sriramveeraghanta Sep 20, 2023
f69d346
chore: store setup for build fixes
sriramveeraghanta Sep 21, 2023
2dcaccd
fix: merge conflicts (#2231)
aaryan610 Sep 21, 2023
9b41b5b
chore: store fixes
sriramveeraghanta Sep 21, 2023
daa3094
chore: update issue detail store to handle peek overview (#2237)
aaryan610 Sep 21, 2023
6a430ed
chore: minor fixes
sriramveeraghanta Sep 22, 2023
0ebe36b
workspace project fixes
sriramveeraghanta Sep 25, 2023
27f78dd
feat: project issues topbar (#2256)
aaryan610 Sep 25, 2023
9a8dcc3
chore: minor fixes
sriramveeraghanta Sep 25, 2023
9831418
chore: filters dropdown (#2260)
aaryan610 Sep 25, 2023
2b419c0
fix: leave project fixes
sriramveeraghanta Sep 25, 2023
310a2ca
refactor: project card component refactor
sriramveeraghanta Sep 25, 2023
43404bf
Implemented swimlanes and kanban view (#2262)
gurusainath Sep 26, 2023
1b8d58a
fix: computed filters logic
aaryan610 Sep 26, 2023
7c0c0da
Merge branch 'fix/issues-layout-mobx' of https://github.com/makeplane…
aaryan610 Sep 26, 2023
c48cd3e
chore: added sub_group_by in params and handled sub-group-by render e…
gurusainath Sep 26, 2023
c342ab3
fix: ui package setup and project update form refactor
sriramveeraghanta Sep 27, 2023
151662a
fix: ui package setup
sriramveeraghanta Sep 27, 2023
ccf6bd4
Merge branch 'fix/issues-layout-mobx' of github.com:makeplane/plane i…
sriramveeraghanta Sep 27, 2023
b2d17e6
fix: minor ui fixes
sriramveeraghanta Sep 28, 2023
3bf590b
dev: calendar view layout revamp (#2293)
aaryan610 Sep 28, 2023
5af753f
chore: removed demo m-store routes
gurusainath Sep 28, 2023
2643de8
cycles changes
sriramveeraghanta Sep 28, 2023
f60dcdc
Merge branch 'fix/issues-layout-mobx' of github.com:makeplane/plane i…
sriramveeraghanta Sep 28, 2023
b70047b
chore: issues grouped kanban and swimlanes UI and functionality (#2294)
gurusainath Sep 29, 2023
479c145
refactor: filter components, constants and helper functions (#2297)
aaryan610 Sep 29, 2023
9ad1e73
dev: gantt chart implementation using MobX (#2302)
aaryan610 Sep 29, 2023
7270424
dev: spreadsheet layout implementation using MobX (#2306)
aaryan610 Sep 29, 2023
f227058
chore: refactoring cycles list
sriramveeraghanta Sep 29, 2023
405a398
feat: adding additional ui components
sriramveeraghanta Sep 29, 2023
569a6c3
dev: applied filters list implementation using MobX (#2325)
aaryan610 Oct 2, 2023
a39aa80
Merge branch 'fix/issues-layout-mobx' of github.com:makeplane/plane i…
sriramveeraghanta Oct 2, 2023
9c2ea8a
fix: cycles views list and board
sriramveeraghanta Oct 2, 2023
b1448c9
fix: cycles list rendering fixes
sriramveeraghanta Oct 2, 2023
41fd9ce
fix: layout fixes
sriramveeraghanta Oct 2, 2023
7be038a
refactor: filter components (#2359)
aaryan610 Oct 4, 2023
b5b8095
chore: issue properties for list and kanban layouts and implemented e…
gurusainath Oct 4, 2023
844a3e4
chore: filters import conflict
gurusainath Oct 4, 2023
0f47762
dev: setup module and module filter store (#2364)
aaryan610 Oct 4, 2023
547a265
chore: issue list layout (#2367)
gurusainath Oct 4, 2023
71604bb
chore: merge develop (#2388)
aaryan610 Oct 5, 2023
13874f2
fix: build erros
aaryan610 Oct 5, 2023
e28919a
chore: cycles, modules store integration, list and kanban layouts and…
gurusainath Oct 9, 2023
0ef2200
refactor: change naming convention (#2383)
aaryan610 Oct 9, 2023
f444309
fix:auth layer revamp
sriramveeraghanta Oct 10, 2023
57e2ed2
chore: Implemented list and kanban views in project modules (#2402)
gurusainath Oct 10, 2023
4dec676
dev: implement global views using MobX (#2404)
aaryan610 Oct 11, 2023
991a685
fix: Auth fixes and Layout fixes (#2408)
sriramveeraghanta Oct 11, 2023
9f61d8b
fix: analytics page fixes
sriramveeraghanta Oct 11, 2023
00b40fb
dev: implemented project views using MobX (#2410)
aaryan610 Oct 11, 2023
35a7d10
chore: plane ui library component and code refactor (#2406)
anmolsinghbhatia Oct 11, 2023
faf0a64
fix: gitignore fixes
sriramveeraghanta Oct 11, 2023
d58d639
fix: project card fixes
sriramveeraghanta Oct 11, 2023
67b2821
chore: ui component revamp (#2415)
anmolsinghbhatia Oct 11, 2023
265e60a
chore: implement new worksapace wrapper for global views (#2412)
aaryan610 Oct 11, 2023
fcfdd74
dev: add remaining layouts to cycle (#2413)
aaryan610 Oct 11, 2023
08d9f15
fix: workspace auth wrapper changes
sriramveeraghanta Oct 11, 2023
2a4e61f
chore: project card revamp and refactor (#2416)
anmolsinghbhatia Oct 12, 2023
f2c3ad4
removing dist from ui
sriramveeraghanta Oct 12, 2023
404e6a0
refactor: analytics (#2419)
aaryan610 Oct 12, 2023
8aebf0b
refactor: folder structure, remove junk code (#2423)
aaryan610 Oct 13, 2023
9b0b5fc
fix: services fixes
sriramveeraghanta Oct 13, 2023
7b5779c
fix: store imports changes
sriramveeraghanta Oct 13, 2023
06bbc4c
fix: merge conflicts resolved from develop
sriramveeraghanta Oct 13, 2023
863d5ab
fix: services export fixes
sriramveeraghanta Oct 13, 2023
c7341ef
fix: services implementation fixes
sriramveeraghanta Oct 13, 2023
ea85f5d
fix: build issue fixes
sriramveeraghanta Oct 13, 2023
9d50d28
fix: react library fixes
sriramveeraghanta Oct 13, 2023
44df9e5
refactor: MobX store folder structure (#2435)
aaryan610 Oct 13, 2023
f7f9881
fix: service import errors (#2436)
aaryan610 Oct 14, 2023
93cd04f
build fixes
sriramveeraghanta Oct 14, 2023
bc37c02
editor ts config fixes
sriramveeraghanta Oct 14, 2023
2ce2bc8
fix: turbo and build fixes
sriramveeraghanta Oct 14, 2023
e3828db
fix: Auth screen loading implementation
sriramveeraghanta Oct 15, 2023
414908d
fix: build issues
sriramveeraghanta Oct 15, 2023
f450cf8
fix: turbo settings for ui package
sriramveeraghanta Oct 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/create-sync-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Create PR in Plane EE Repository to sync the changes

on:
pull_request:
branches:
branches:
- master
types:
- closed
Expand Down
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,33 @@ Meet [Plane](https://plane.so). An open-source software development tool to mana

The easiest way to get started with Plane is by creating a [Plane Cloud](https://app.plane.so) account. Plane Cloud offers a hosted solution for Plane. If you prefer to self-host Plane, please refer to our [deployment documentation](https://docs.plane.so/self-hosting).

## ⚡️ Contributors Quick Start
## ⚡️ Contributors Quick Start

### Prerequisite

Development system must have docker engine installed and running.

### Steps

### Steps
Setting up local environment is extremely easy and straight forward. Follow the below step and you will be ready to contribute

1. Clone the code locally using `git clone https://github.com/makeplane/plane.git`
1. Switch to the code folder `cd plane`
1. Create your feature or fix branch you plan to work on using `git checkout -b <feature-branch-name>`
1. Open terminal and run `./setup.sh`
1. Open the code on VSCode or similar equivalent IDE
1. Open the code on VSCode or similar equivalent IDE
1. Review the `.env` files available in various folders. Visit [Environment Setup](./ENV_SETUP.md) to know about various environment variables used in system
1. Run the docker command to initiate various services `docker compose -f docker-compose-local.yml up -d`

You are ready to make changes to the code. Do not forget to refresh the browser (in case id does not auto-reload)
```bash
./setup.sh
```

Thats it!
You are ready to make changes to the code. Do not forget to refresh the browser (in case id does not auto-reload)

Thats it!

## 🍙 Self Hosting
## 🍙 Self Hosting

For self hosting environment setup, visit the [Self Hosting](https://docs.plane.so/self-hosting) documentation page

Expand Down
1 change: 0 additions & 1 deletion apiserver/plane/utils/issue_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ def filter_target_date(params, filter, method):
if method == "GET":
target_dates = params.get("target_date").split(",")
if len(target_dates) and "" not in target_dates:

date_filter(filter=filter, date_term="target_date", queries=target_dates)
else:
if params.get("target_date", None) and len(params.get("target_date")):
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"prettier": "latest",
"prettier-plugin-tailwindcss": "^0.5.4",
"tailwindcss": "^3.3.3",
"turbo": "latest"
"turbo": "^1.10.14"
},
"resolutions": {
"@types/react": "18.2.0"
Expand Down
13 changes: 3 additions & 10 deletions packages/editor/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
{
"extends": "tsconfig/react.json",
"include": [
"src/**/*",
"index.d.ts"
],
"exclude": [
"dist",
"build",
"node_modules"
]
"extends": "tsconfig/react-library.json",
"include": ["src/**/*", "index.d.ts"],
"exclude": ["dist", "build", "node_modules"]
}
13 changes: 3 additions & 10 deletions packages/editor/lite-text-editor/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
{
"extends": "tsconfig/react.json",
"include": [
"src/**/*",
"index.d.ts"
],
"exclude": [
"dist",
"build",
"node_modules"
]
"extends": "tsconfig/react-library.json",
"include": ["src/**/*", "index.d.ts"],
"exclude": ["dist", "build", "node_modules"]
}
13 changes: 3 additions & 10 deletions packages/editor/rich-text-editor/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
{
"extends": "tsconfig/react.json",
"include": [
"src/**/*",
"index.d.ts"
],
"exclude": [
"dist",
"build",
"node_modules"
]
"extends": "tsconfig/react-library.json",
"include": ["src/**/*", "index.d.ts"],
"exclude": ["dist", "build", "node_modules"]
}
5 changes: 3 additions & 2 deletions packages/tailwind-config-custom/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ module.exports = {
"./layouts/**/*.tsx",
"./pages/**/*.tsx",
"./ui/**/*.tsx",
"../packages/editor/**/*.{js,ts,jsx,tsx}"
]
"../packages/ui/**/*.{js,ts,jsx,tsx}",
"../packages/editor/**/*.{js,ts,jsx,tsx}",
],
},
theme: {
extend: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"jsx": "react-jsx",
"lib": ["ES2015", "DOM"],
"module": "ESNext",
"target": "es6"
"target": "es6",
"sourceMap": true
}
}
3 changes: 0 additions & 3 deletions packages/ui/button/index.tsx

This file was deleted.

17 changes: 0 additions & 17 deletions packages/ui/index.tsx

This file was deleted.

37 changes: 27 additions & 10 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,40 @@
{
"name": "ui",
"version": "0.13.2",
"main": "./index.tsx",
"types": "./index.tsx",
"name": "@plane/ui",
"version": "0.0.1",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"sideEffects": false,
"license": "MIT",
"files": [
"dist/**"
],
"scripts": {
"lint": "eslint *.ts*"
"build": "tsup src/index.tsx --format esm,cjs --dts --external react",
"dev": "tsup src/index.tsx --format esm,cjs --watch --dts --external react",
"lint": "eslint src/",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
},
"devDependencies": {
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@typescript-eslint/eslint-plugin": "^5.51.0",
"@types/node": "^20.5.2",
"@types/react": "18.2.0",
"@types/react-dom": "18.2.0",
"classnames": "^2.3.2",
"eslint": "^7.32.0",
"eslint-config-custom": "*",
"next": "12.3.2",
"react": "^18.2.0",
"tsconfig": "*",
"tailwind-config-custom": "*",
"tsup": "^5.10.1",
"typescript": "4.7.4"
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@blueprintjs/core": "^4.16.3",
"@blueprintjs/popover2": "^1.13.3",
"@headlessui/react": "^1.7.17",
"clsx": "^2.0.0",
"next-themes": "^0.2.1"
}
}
66 changes: 66 additions & 0 deletions packages/ui/src/button/button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import * as React from "react";

import {
getIconStyling,
getButtonStyling,
TButtonVariant,
TButtonSizes,
} from "./helper";

export interface ButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
variant?: TButtonVariant;
size?: TButtonSizes;
className?: string;
loading?: boolean;
disabled?: boolean;
appendIcon?: any;
prependIcon?: any;
children: React.ReactNode;
}

const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
(props, ref) => {
const {
variant = "primary",
size = "md",
className = "",
type = "button",
loading = false,
disabled = false,
prependIcon = null,
appendIcon = null,
children,
...rest
} = props;

const buttonStyle = getButtonStyling(variant, size, disabled || loading);
const buttonIconStyle = getIconStyling(size);

return (
<button
ref={ref}
type={type}
className={`${buttonStyle} ${className}`}
disabled={disabled || loading}
{...rest}
>
{prependIcon && (
<div className={buttonIconStyle}>
{React.cloneElement(prependIcon, { "stroke-width": 2 })}
</div>
)}
{children}
{appendIcon && (
<div className={buttonIconStyle}>
{React.cloneElement(appendIcon, { "stroke-width": 2 })}
</div>
)}
</button>
);
}
);

Button.displayName = "plane-ui-button";

export { Button };
123 changes: 123 additions & 0 deletions packages/ui/src/button/helper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
export type TButtonVariant =
| "primary"
| "accent-primary"
| "outline-primary"
| "neutral-primary"
| "link-primary"
| "danger"
| "accent-danger"
| "outline-danger"
| "link-danger"
| "tertiary-danger";

export type TButtonSizes = "sm" | "md" | "lg" | "xl";

export interface IButtonStyling {
[key: string]: {
default: string;
hover: string;
pressed: string;
disabled: string;
};
}

enum buttonSizeStyling {
sm = `px-3 py-1.5 font-medium text-xs rounded flex items-center gap-1.5 whitespace-nowrap transition-all justify-center inline`,
md = `px-4 py-1.5 font-medium text-sm rounded flex items-center gap-1.5 whitespace-nowrap transition-all justify-center inline`,
lg = `px-5 py-2 font-medium text-sm rounded flex items-center gap-1.5 whitespace-nowrap transition-all justify-center inline`,
xl = `px-5 py-3.5 font-medium text-sm rounded flex items-center gap-1.5 whitespace-nowrap transition-all justify-center inline`,
}

enum buttonIconStyling {
sm = "h-3 w-3 flex justify-center items-center overflow-hidden my-0.5 flex-shrink-0",
md = "h-3.5 w-3.5 flex justify-center items-center overflow-hidden my-0.5 flex-shrink-0",
lg = "h-4 w-4 flex justify-center items-center overflow-hidden my-0.5 flex-shrink-0",
xl = "h-4 w-4 flex justify-center items-center overflow-hidden my-0.5 flex-shrink-0",
}

export const buttonStyling: IButtonStyling = {
primary: {
default: `text-white bg-custom-primary-100`,
hover: `hover:bg-custom-primary-200`,
pressed: `focus:text-custom-brand-40 focus:bg-custom-primary-200`,
disabled: `cursor-not-allowed !bg-custom-primary-60 hover:bg-custom-primary-60`,
},
"accent-primary": {
default: `bg-custom-primary-10 text-custom-primary-100`,
hover: `hover:bg-custom-primary-20 hover:text-custom-primary-200`,
pressed: `focus:bg-custom-primary-20`,
disabled: `cursor-not-allowed !text-custom-primary-60`,
},
"outline-primary": {
default: `text-custom-primary-100 bg-custom-background-100 border border-custom-primary-100`,
hover: `hover:border-custom-primary-80 hover:bg-custom-primary-10`,
pressed: `focus:text-custom-primary-80 focus:bg-custom-primary-10 focus:border-custom-primary-80`,
disabled: `cursor-not-allowed !text-custom-primary-60 !border-custom-primary-60 `,
},
"neutral-primary": {
default: `text-custom-text-200 bg-custom-background-100 border border-custom-border-200`,
hover: `hover:bg-custom-background-90`,
pressed: `focus:text-custom-text-300 focus:bg-custom-background-90`,
disabled: `cursor-not-allowed !text-custom-text-400`,
},
"link-primary": {
default: `text-custom-primary-100 bg-custom-background-100`,
hover: `hover:text-custom-primary-200`,
pressed: `focus:text-custom-primary-80 `,
disabled: `cursor-not-allowed !text-custom-primary-60`,
},

danger: {
default: `text-white bg-red-500`,
hover: ` hover:bg-red-600`,
pressed: `focus:text-red-200 focus:bg-red-600`,
disabled: `cursor-not-allowed !bg-red-300`,
},
"accent-danger": {
default: `text-red-500 bg-red-50`,
hover: `hover:text-red-600 hover:bg-red-100`,
pressed: `focus:text-red-500 focus:bg-red-100`,
disabled: `cursor-not-allowed !text-red-300`,
},
"outline-danger": {
default: `text-red-500 bg-custom-background-100 border border-red-500`,
hover: `hover:text-red-400 hover:border-red-400`,
pressed: `focus:text-red-400 focus:border-red-400`,
disabled: `cursor-not-allowed !text-red-300 !border-red-300`,
},
"link-danger": {
default: `text-red-500 bg-custom-background-100`,
hover: `hover:text-red-400`,
pressed: `focus:text-red-400`,
disabled: `cursor-not-allowed !text-red-300`,
},
"tertiary-danger": {
default: `text-red-500 bg-custom-background-100 border border-red-200`,
hover: `hover:bg-red-50 hover:border-red-300`,
pressed: `focus:text-red-400`,
disabled: `cursor-not-allowed !text-red-300`,
},
};

export const getButtonStyling = (
variant: TButtonVariant,
size: TButtonSizes,
disabled: boolean = false
): string => {
let _variant: string = ``;
const currentVariant = buttonStyling[variant];

_variant = `${currentVariant.default} ${
disabled ? currentVariant.disabled : currentVariant.hover
} ${currentVariant.pressed}`;

let _size: string = ``;
if (size) _size = buttonSizeStyling[size];
return `${_variant} ${_size}`;
};

export const getIconStyling = (size: TButtonSizes): string => {
let icon: string = ``;
if (size) icon = buttonIconStyling[size];
return icon;
};
Loading