Skip to content

Instantly share code, notes, and snippets.

@sullemanhossam
Created August 3, 2024 21:40
Show Gist options
  • Save sullemanhossam/d19e5e73a450480320f6c093e0fbe132 to your computer and use it in GitHub Desktop.
Save sullemanhossam/d19e5e73a450480320f6c093e0fbe132 to your computer and use it in GitHub Desktop.
import React from "react";
import PropTypes from "prop-types";
import blacklist from "blacklist";
import { Text } from "ink";
const BLACKLIST_PROPS = ["text"];
class Title extends React.Component {
render() {
const props = blacklist(this.props, BLACKLIST_PROPS);
return (
<Gradient name="blue">
<BigText text="unicorns" />
</Gradient>
);
}
}
Title.defaultProps = {
columns: 0,
percent: 1,
left: 0,
right: 0,
character: "█",
rightPad: false
};
Title.propTypes = {
columns: PropTypes.number,
percent: PropTypes.number,
left: PropTypes.number,
right: PropTypes.number,
character: PropTypes.string,
rightPad: PropTypes.bool
};
export default Title;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment