You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
carbon/components/WindowPointer.js

25 lines
622 B
JavaScript

import React from 'react'
export default function WindowPointer({ fromLeft, fromRight, color = '#fff' }) {
return (
<div>
<div className="window-pointer" />
<style jsx>
{`
.window-pointer {
width: 0px;
height: 0px;
border-style: solid;
border-width: 0 5px 6px 5px;
border-color: transparent transparent ${color} transparent;
position: absolute;
top: -8px;
left: ${fromLeft || 'initial'};
right: ${fromRight || 'initial'};
}
`}
</style>
</div>
)
}