mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 18:33:33 +00:00
Add favorite/rating table columns
This commit is contained in:
parent
d1dfbaedaa
commit
ab031820f6
12 changed files with 158 additions and 29 deletions
|
|
@ -2,10 +2,11 @@ import type { ReactNode } from 'react';
|
|||
import type { IHeaderParams } from '@ag-grid-community/core';
|
||||
import { AiOutlineNumber } from 'react-icons/ai';
|
||||
import { FiClock } from 'react-icons/fi';
|
||||
import { RiHeartLine, RiStarLine } from 'react-icons/ri';
|
||||
import styled from 'styled-components';
|
||||
import { _Text } from '/@/renderer/components/text';
|
||||
|
||||
type Presets = 'duration' | 'rowIndex';
|
||||
type Presets = 'duration' | 'rowIndex' | 'userFavorite' | 'userRating';
|
||||
|
||||
type Options = {
|
||||
children?: ReactNode;
|
||||
|
|
@ -39,7 +40,12 @@ const TextHeaderWrapper = styled(_Text)<{ position: Options['position'] }>`
|
|||
text-transform: uppercase;
|
||||
`;
|
||||
|
||||
const headerPresets = { duration: <FiClock size={15} />, rowIndex: <AiOutlineNumber size={15} /> };
|
||||
const headerPresets = {
|
||||
duration: <FiClock size={15} />,
|
||||
rowIndex: <AiOutlineNumber size={15} />,
|
||||
userFavorite: <RiHeartLine size={15} />,
|
||||
userRating: <RiStarLine size={15} />,
|
||||
};
|
||||
|
||||
export const GenericTableHeader = (
|
||||
{ displayName }: IHeaderParams,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue