mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 18:13:31 +00:00
Highlight currently playing song on all song tables (#178)
This commit is contained in:
parent
919016ca5a
commit
ece7fecc76
13 changed files with 299 additions and 194 deletions
|
|
@ -102,6 +102,7 @@ export const CombinedTitleCell = ({ value, rowIndex, node }: ICellRendererParams
|
|||
</ImageWrapper>
|
||||
<MetadataWrapper>
|
||||
<Text
|
||||
className="current-song-child"
|
||||
overflow="hidden"
|
||||
size="md"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,10 @@
|
|||
import type { ICellRendererParams } from '@ag-grid-community/core';
|
||||
import { motion, Variants } from 'framer-motion';
|
||||
import { Link } from 'react-router-dom';
|
||||
import styled from 'styled-components';
|
||||
import { Skeleton } from '/@/renderer/components/skeleton';
|
||||
import { Text } from '/@/renderer/components/text';
|
||||
|
||||
export const CELL_VARIANTS: Variants = {
|
||||
animate: {
|
||||
opacity: 1,
|
||||
},
|
||||
initial: {
|
||||
opacity: 0,
|
||||
},
|
||||
};
|
||||
|
||||
export const CellContainer = styled(motion.div)<{ position?: 'left' | 'center' | 'right' }>`
|
||||
export const CellContainer = styled.div<{ position?: 'left' | 'center' | 'right' }>`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: ${(props) =>
|
||||
|
|
|
|||
29
src/renderer/components/virtual-table/cells/title-cell.tsx
Normal file
29
src/renderer/components/virtual-table/cells/title-cell.tsx
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
import type { ICellRendererParams } from '@ag-grid-community/core';
|
||||
import { Skeleton } from '/@/renderer/components/skeleton';
|
||||
import { Text } from '/@/renderer/components/text';
|
||||
import { CellContainer } from '/@/renderer/components/virtual-table/cells/generic-cell';
|
||||
|
||||
export const TitleCell = ({ value }: ICellRendererParams) => {
|
||||
if (value === undefined) {
|
||||
return (
|
||||
<CellContainer position="left">
|
||||
<Skeleton
|
||||
height="1rem"
|
||||
width="80%"
|
||||
/>
|
||||
</CellContainer>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<CellContainer position="left">
|
||||
<Text
|
||||
className="current-song-child"
|
||||
overflow="hidden"
|
||||
size="md"
|
||||
>
|
||||
{value}
|
||||
</Text>
|
||||
</CellContainer>
|
||||
);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue