-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from AndyOooh/ED1-68-refactor-components-to-ui
Ed1 68 refactor components to UI
- Loading branch information
Showing
24 changed files
with
169 additions
and
239 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
2 changes: 1 addition & 1 deletion
2
apps/app/src/app/(protected)/events/create/form/event-roles/form-data.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
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,43 +1,25 @@ | ||
import React from 'react'; | ||
|
||
import { ReactNode } from 'react'; | ||
import { RiCheckboxCircleFill } from 'react-icons/ri'; | ||
import { colorMap } from './utils/brandColors'; | ||
|
||
type Props = { | ||
image: React.ReactNode; | ||
image: ReactNode; | ||
name: string; | ||
title: string; | ||
// textLocation: 'left' | 'right'; | ||
className?: string; | ||
textClassName?: string; | ||
}; | ||
|
||
export const ImageWithtext = ({ | ||
image, | ||
name, | ||
title, | ||
// textLocation = 'left', | ||
className, | ||
textClassName, | ||
}: Props) => { | ||
export const ImageWithtext = ({ image, name, title, className, textClassName }: Props) => { | ||
return ( | ||
<div className={`${className} relative z-20`}> | ||
{/* <div className='relative'> */} | ||
<div className='rounded-3xl overflow-hidden'>{image}</div> | ||
{/* <div className="badge">neutral</div> */} | ||
|
||
{/* <div className='relative'> */} | ||
{/* <div className='absolute bottom-0 right-1/2 flex gap-4 bg-primary px-2 py-1 rounded'> */} | ||
<div | ||
className={`absolute flex gap-4 bg-base-200 px-2 py-1 rounded ${textClassName}`}> | ||
{/* className={`absolute bottom-0 left-1/2 flex gap-4 bg-primary px-2 py-1 rounded`}> */} | ||
<div className={`absolute flex gap-4 bg-base-200 px-2 py-1 rounded ${textClassName}`}> | ||
<div className='flex flex-col justify-center'> | ||
<span className='text-sm font-semibold'>{name}</span>{' '} | ||
<span className='text-sm whitespace-nowrap'>{title}</span> | ||
</div> | ||
<RiCheckboxCircleFill color='green' size={'1rem'} /> | ||
</div> | ||
{/* </div> */} | ||
</div> | ||
); | ||
}; |
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 |
---|---|---|
@@ -1,42 +1,17 @@ | ||
import React from 'react' | ||
type Props = { | ||
stat: { | ||
title: string; | ||
value: string | number; | ||
}; | ||
}; | ||
|
||
type Props = {} | ||
|
||
export const Stat = (props: Props) => { | ||
export const Stat = ({ stat }: Props) => { | ||
return ( | ||
<div className="stats shadow"> | ||
|
||
<div className="stat"> | ||
<div className="stat-figure text-primary"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" className="inline-block w-8 h-8 stroke-current"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"></path></svg> | ||
</div> | ||
<div className="stat-title">Total Likes</div> | ||
<div className="stat-value text-primary">25.6K</div> | ||
<div className="stat-desc">21% more than last month</div> | ||
</div> | ||
|
||
<div className="stat"> | ||
<div className="stat-figure text-secondary"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" className="inline-block w-8 h-8 stroke-current"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg> | ||
</div> | ||
<div className="stat-title">Page Views</div> | ||
<div className="stat-value text-secondary">2.6M</div> | ||
<div className="stat-desc">21% more than last month</div> | ||
</div> | ||
|
||
<div className="stat"> | ||
<div className="stat-figure text-secondary"> | ||
<div className="avatar online"> | ||
<div className="w-16 rounded-full"> | ||
<img src="/images/stock/photo-1534528741775-53994a69daeb.jpg" /> | ||
</div> | ||
</div> | ||
<div | ||
key={stat.title} | ||
className='flex flex-col justify-center items-center gap-4 bg-base-100 p-4 rounded-3xl shadow-md'> | ||
<p className='stat-title text-sm font-semibold'>{stat.title}</p> | ||
<p className='text-3xl stat-value text-neutral'>{stat.value}</p> | ||
</div> | ||
<div className="stat-value">86%</div> | ||
<div className="stat-title">Tasks done</div> | ||
<div className="stat-desc text-secondary">31 tasks remaining</div> | ||
</div> | ||
|
||
</div> | ||
) | ||
} | ||
); | ||
}; |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
packages/ui/src/forms/Button.tsx → packages/ui/src/form-elements/Button.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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import * as React from "react"; | ||
|
||
/* Not in use, delete */ | ||
export const Button = () => { | ||
return <button className='btn btn-secondary'>Orange div from ui package</button>; | ||
}; |
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 4 additions & 3 deletions
7
packages/ui/src/forms/index.tsx → packages/ui/src/form-elements/index.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 |
---|---|---|
@@ -1,12 +1,13 @@ | ||
export * from './Button'; | ||
export * from './FormError'; | ||
|
||
// export { SearchableSelect } from './old-unused/SearchableSelect'; | ||
// export { SearchableSelect2 } from './old-unused/SearchableSelect2'; | ||
// export { ReactSelect } from './old-unusedReactSelect'; | ||
|
||
export { TextInput } from './TextInput'; | ||
export { Checkbox } from './Checkbox'; | ||
export { Select } from './Select'; | ||
export { SearchableSelect } from './SearchableSelect'; | ||
export { SearchableSelect2 } from './SearchableSelect2'; | ||
export { ReactSelect } from './ReactSelect'; | ||
export { DatePicker } from './DatePicker'; | ||
export { ActionButton } from './ActionButton'; | ||
export { RadioButtonMulti } from './RadioButtonMulti'; |
Oops, something went wrong.