react-icons/fi#FiZap TypeScript Examples
The following examples show how to use
react-icons/fi#FiZap.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: icons.tsx From documentation with MIT License | 6 votes |
iconKeyMap = {
star: (props) => <FiStar {...props} />,
zap: (props) => <FiZap {...props} />,
repeat: (props) => <FiRepeat {...props} />,
users: (props) => <FiUsers {...props} />,
server: (props) => <FiServer {...props} />,
edit: (props) => <FiEdit {...props} />,
gitMerge: (props) => <FiGitMerge {...props} />,
download: (props) => <FiDownload {...props} />,
}
Example #2
Source File: Forum.tsx From dxvote with GNU Affero General Public License v3.0 | 5 votes |
ForumPage = () => {
const LoadingBox = styled.div`
.loader {
text-align: center;
font-weight: 500;
font-size: 20px;
line-height: 18px;
color: var(--dark-text-gray);
padding: 25px 0px;
.svg {
height: 30px;
width: 30px;
margin-bottom: 10px;
}
}
`;
const [loading, setLoading] = React.useState(true);
function postMessageReceived(e) {
if (!e) {
return;
}
if (loading) {
setLoading(false);
}
}
window.addEventListener('message', postMessageReceived, false);
var lists = document.querySelectorAll('d-topics-list');
for (var i = 0; i < lists.length; i++) {
var list = lists[i];
var url = list.getAttribute('discourse-url');
if (!url || url.length === 0) {
console.error('Error, `discourse-url` was not found');
continue;
}
var frameId = 'de-' + Math.random().toString(36).substr(2, 9);
var params = ['discourse_embed_id=' + frameId];
list.removeAttribute('discourse-url');
for (var j = 0; j < list.attributes.length; j++) {
var attr = list.attributes[j];
params.push(attr.name.replace('-', '_') + '=' + attr.value);
}
var iframe = document.createElement('iframe');
iframe.src = url + '/embed/topics?' + params.join('&');
iframe.id = frameId;
iframe.width = '100%';
iframe.frameBorder = '0';
iframe.scrolling = 'no';
list.appendChild(iframe);
}
return (
<Box noPadding>
{loading ? (
<LoadingBox>
<div className="loader">
{' '}
<FiZap /> <br /> Loading..{' '}
</div>
</LoadingBox>
) : (
// @ts-ignore
<d-topics-list
discourse-url="https://daotalk.org/"
category="15"
per-page="10000"
template="complete"
/>
)}
</Box>
);
}