![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
@studyportals/tooltip
Advanced tools
This is the Studyportals implementation of tooltips as defined in the design system. More information can be found in the Studyportals StyleGuide.
Tooltip can be implemented as a DLL dependency.
The following commands can be used to setup and run a local environment for developing the tooltip component. Also, we're using husky
to run unit tests before a git push
is done. This could be by-passed (if absolutely necessary) by running git push --no-verify
.
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm start
# build for production with minification
npm run build
# run linter
npm run lint
npm run lint:fix # with fix
# run unit tests
npm run unit
There are two variations of the tooltip component your application can use, these are called ContextualTooltip
and GuidanceTooltip
. While they are a bit different in their purpose, they are largely the same in the way they are implemented in your code. The only differences are that GuidanceTooltip
works with a click interaction instead of hover interactions and has an additional configuration option to disable click interactions on the element it's bound to.
const simple = new ContextualTooltip({
element: HTMLElement,
content: HTMLElement | string,
position?: Position
})
const complex = new GuidanceTooltip({
element: HTMLElement,
content: HTMLElement | string,
position?: Position,
disableClick?: boolean,
onClose?: Function
})
Property | Type | Description |
---|---|---|
element | HTMLElement | The element which the tooltip will be bound to. |
content | HTMLElement or string | The content of the tooltip. |
position (optional) | Position (bottom or top ) | The vertical position of the tooltip. (defaults to top ) |
disableClick (optional) | boolean | Disables click listener on element the tooltip is bound to. |
onClose (optional) | Function | A callback for when a user dismisses the tooltip with the close button. |
When using Tooltip in your code, you should also make sure the default Tooltip styling is included. This can be done by importing it like so:
@import '~@studyportals/tooltip/dist/tooltip.css';
FAQs
A generic tooltip component.
The npm package @studyportals/tooltip receives a total of 0 weekly downloads. As such, @studyportals/tooltip popularity was classified as not popular.
We found that @studyportals/tooltip demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 22 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.