github.com/minio/console@v1.4.1/web-app/src/common/MoreLink.tsx (about) 1 // This file is part of MinIO Console Server 2 // Copyright (c) 2023 MinIO, Inc. 3 // 4 // This program is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU Affero General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // This program is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU Affero General Public License for more details. 13 // 14 // You should have received a copy of the GNU Affero General Public License 15 // along with this program. If not, see <http://www.gnu.org/licenses/>. 16 17 import React from "react"; 18 import { ArrowIcon, Box } from "mds"; 19 20 const MoreLink = ({ 21 LeadingIcon, 22 text, 23 link, 24 color, 25 }: { 26 LeadingIcon?: React.FunctionComponent; 27 text: string; 28 link: string; 29 color: string; 30 }) => { 31 return ( 32 <a 33 style={{ 34 color: color, 35 font: "normal normal bold 12px/55px Inter", 36 display: "block", 37 textDecoration: "none", 38 }} 39 href={link} 40 target={"_blank"} 41 > 42 <Box 43 sx={{ 44 display: "flex", 45 flexDirection: "row", 46 alignItems: "center", 47 height: 20, 48 gap: 2, 49 }} 50 > 51 {LeadingIcon && ( 52 <Box 53 sx={{ 54 flexGrow: 0, 55 flexShrink: 1, 56 lineHeight: "12px", 57 "& svg": { 58 height: 16, 59 width: 16, 60 }, 61 }} 62 > 63 <LeadingIcon /> 64 </Box> 65 )} 66 <Box sx={{ flexGrow: 0, flexShrink: 1, lineHeight: "12px" }}> 67 {text} 68 </Box> 69 <Box 70 sx={{ 71 flexGrow: 0, 72 flexShrink: 1, 73 lineHeight: "12px", 74 marginTop: 2, 75 }} 76 > 77 <ArrowIcon style={{ width: 12 }} /> 78 </Box> 79 </Box> 80 </a> 81 ); 82 }; 83 84 export default MoreLink;