-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Channels listing and details page (#1861)
* in progress * added listing api * Ui in progress * fixed type * implemented listing * shifted to api call for channel list * api fixes * fixed the ui of card and category * fixed param type * added fixed * scroll implemented * fixed the pagination for channel list * added listing and search * added preview * fixed the layout * channel details page * added responsiveness support * added layout variant * Update App.tsx * fixed category scroll (#1862) * added layout variant * fixed review comments * fixed review comments * channel category implemented * filters implmented * channels listing page done * debug turned off * fixed review comments * added null state * fixed channel search hook * PR fixes done * fixed the edit channel for category * fixed channel list search query * Wrapped channel img in Link * menu item label changes * fixes done * channel details card refactor * outline button fix and category scroll fix * spacing ui fixes done * category added to channel profile * added config channels * added config channels * fixed select * fixed select * added review changes --------- Co-authored-by: rohitmalhotra1420 <[email protected]>
- Loading branch information
1 parent
22357a5
commit 62db34a
Showing
89 changed files
with
2,444 additions
and
654 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
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,37 @@ | ||
import { FC } from 'react'; | ||
import { IconWrapper } from '../IconWrapper'; | ||
import { IconProps } from '../Icons.types'; | ||
|
||
const Tutorial: FC<IconProps> = (allProps) => { | ||
const { svgProps: props, ...restProps } = allProps; | ||
return ( | ||
<IconWrapper | ||
componentName="Tutorial" | ||
icon={ | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
style={{ width: 'inherit', height: 'inherit' }} | ||
viewBox="0 0 22 21" | ||
fill="none" | ||
{...props} | ||
> | ||
<path | ||
fill-rule="evenodd" | ||
clip-rule="evenodd" | ||
d="M0 2.09998V14.9666C0 16.0712 0.895431 16.9666 2 16.9666H20C21.1046 16.9666 22 16.0712 22 14.9666V2.09998C22 0.995407 21.1046 0.0999756 20 0.0999756H2C0.89543 0.0999756 0 0.995406 0 2.09998ZM8.8 4.31022V12.6964C8.8 12.9192 9.06929 13.0307 9.22678 12.8732L13.7424 8.35756C13.8454 8.25459 13.8389 8.08575 13.7284 7.99097L9.2127 4.12041C9.05053 3.98141 8.8 4.09663 8.8 4.31022Z" | ||
fill="currentColor" | ||
/> | ||
<path | ||
d="M5.8667 19.9H16.1334" | ||
stroke="currentColor" | ||
stroke-width="2" | ||
stroke-linecap="round" | ||
/> | ||
</svg> | ||
} | ||
{...restProps} | ||
/> | ||
); | ||
}; | ||
|
||
export default Tutorial; |
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,53 @@ | ||
import { FC, ReactNode } from 'react'; | ||
import styled, { FlattenSimpleInterpolation } from 'styled-components'; | ||
import { TransformedHTMLAttributes } from '../Blocks.types'; | ||
import { getTextVariantStyles } from '../Blocks.utils'; | ||
|
||
export type PillProps = { | ||
/* Child react nodes rendered by Pill */ | ||
children?: ReactNode; | ||
/* Additional prop from styled components to apply custom css to Lozenge */ | ||
css?: FlattenSimpleInterpolation; | ||
/* Decides the UI state of the component */ | ||
isActive?: boolean; | ||
} & TransformedHTMLAttributes<HTMLDivElement>; | ||
|
||
const StyledPill = styled.div<PillProps>` | ||
align-items: center; | ||
border-radius: var(--radius-xl); | ||
background: var(--components-pill-background-${({ isActive }) => (isActive ? 'selected' : 'default')}); | ||
cursor: pointer; | ||
display: flex; | ||
flex-direction: column; | ||
height: 40px; | ||
justify-content: center; | ||
max-width: max-content; | ||
padding: var(--spacing-none) var(--spacing-sm); | ||
${({ isActive }) => | ||
getTextVariantStyles('bs-semibold', isActive ? 'components-pill-text-selected' : 'components-pill-text-default')} | ||
&:hover { | ||
${({ isActive }) => | ||
!isActive && | ||
`background: var(--components-pill-background-hover); | ||
color: var(--components-pill-text-default);`} | ||
} | ||
/* Custom CSS applied via styled component css prop */ | ||
${(props) => props.css || ''} | ||
`; | ||
|
||
const Pill: FC<PillProps> = ({ children, isActive = false, onClick, ...props }) => { | ||
return ( | ||
<StyledPill | ||
isActive={isActive} | ||
onClick={onClick} | ||
{...props} | ||
> | ||
{children} | ||
</StyledPill> | ||
); | ||
}; | ||
|
||
export { Pill }; |
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 * from './Pill'; |
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,18 @@ | ||
import { colorBrands } from '../colors/colors.brands'; | ||
import { surfaceSemantics } from './semantics.surface'; | ||
import { textSemantics } from './semantics.text'; | ||
|
||
export const pillSemantics = { | ||
'background-default': { light: colorBrands['neutral-100'], dark: colorBrands['neutral-700'] }, | ||
'background-selected': { | ||
light: surfaceSemantics['primary-inverse'].light, | ||
dark: surfaceSemantics['primary-inverse'].dark, | ||
}, | ||
'background-hover': { light: colorBrands['neutral-200'], dark: colorBrands['neutral-800'] }, | ||
|
||
'text-default': { light: textSemantics['primary'].light, dark: textSemantics['primary'].dark }, | ||
'text-selected': { | ||
light: textSemantics['primary-inverse'].light, | ||
dark: textSemantics['primary-inverse'].dark, | ||
}, | ||
}; |
Oops, something went wrong.