Export FeedCard.Action and optionally include in ListCard
This commit is contained in:
@@ -8,7 +8,7 @@ import {sanitizeHandle} from 'lib/strings/handles'
|
|||||||
import {precacheList} from 'state/queries/feed'
|
import {precacheList} from 'state/queries/feed'
|
||||||
import {useTheme} from '#/alf'
|
import {useTheme} from '#/alf'
|
||||||
import {atoms as a} from '#/alf'
|
import {atoms as a} from '#/alf'
|
||||||
import {Avatar, Description, Header, Outer} from '#/components/FeedCard'
|
import {Action, Avatar, Description, Header, Outer} from '#/components/FeedCard'
|
||||||
import {Link as InternalLink, LinkProps} from '#/components/Link'
|
import {Link as InternalLink, LinkProps} from '#/components/Link'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
|
|
||||||
@@ -18,24 +18,29 @@ import {Text} from '#/components/Typography'
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
Action,
|
||||||
|
Avatar,
|
||||||
AvatarPlaceholder,
|
AvatarPlaceholder,
|
||||||
|
Description,
|
||||||
|
Header,
|
||||||
|
Outer,
|
||||||
TitleAndBylinePlaceholder,
|
TitleAndBylinePlaceholder,
|
||||||
} from '#/components/FeedCard'
|
} from '#/components/FeedCard'
|
||||||
|
|
||||||
export {Avatar, Description, Header, Outer}
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
view: AppBskyGraphDefs.ListView
|
view: AppBskyGraphDefs.ListView
|
||||||
|
showPinButton?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Default(props: Props) {
|
export function Default(props: Props) {
|
||||||
const {view} = props
|
const {view, showPinButton} = props
|
||||||
return (
|
return (
|
||||||
<Link label={view.name} {...props}>
|
<Link label={view.name} {...props}>
|
||||||
<Outer>
|
<Outer>
|
||||||
<Header>
|
<Header>
|
||||||
<Avatar src={view.avatar} />
|
<Avatar src={view.avatar} />
|
||||||
<TitleAndByline title={view.name} creator={view.creator} />
|
<TitleAndByline title={view.name} creator={view.creator} />
|
||||||
|
{showPinButton && <Action uri={view.uri} pin type="list" />}
|
||||||
</Header>
|
</Header>
|
||||||
<Description description={view.description} />
|
<Description description={view.description} />
|
||||||
</Outer>
|
</Outer>
|
||||||
|
|||||||
Reference in New Issue
Block a user