import Icon from "components/ads/Icon"; import { Theme } from "constants/DefaultTheme"; import React from "react"; import styled, { withTheme } from "styled-components"; import { getTypographyByKey } from "constants/DefaultTheme"; import { VIEW_LATEST, createMessage } from "@appsmith/constants/messages"; const Container = styled.div` position: absolute; right: 10px; bottom: 10px; cursor: pointer; color: ${(props) => props.theme.colors.comments.viewLatest}; text-transform: uppercase; display: flex; ${(props) => getTypographyByKey(props, "btnMedium")} & .view-latest { margin-right: ${(props) => props.theme.spaces[1]}px; } `; const ScrollToLatest = withTheme( ({ scrollToBottom, theme }: { scrollToBottom: () => void; theme: Theme }) => { return ( {createMessage(VIEW_LATEST)} ); }, ); export default ScrollToLatest;