Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bee-anchor

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bee-anchor - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

build/Anchor.js

@@ -76,3 +76,3 @@ 'use strict';

var props = this.props;
this.anchor = new _gumshoejs2["default"]('#my-awesome-nav a', _extends({}, props));
this.anchor = new _gumshoejs2["default"](props.selector, _extends({}, props));
this.anchorDOM.addEventListener('gumshoeActivate', function (event) {

@@ -79,0 +79,0 @@ // The list item

@@ -0,3 +1,8 @@

<a name="0.0.2"></a>
## [0.0.2](https://github.com/tinper-bee/bee-anchor/compare/v0.0.1...v0.0.2) (2019-03-29)
<a name="0.0.1"></a>
## 0.0.1 (2019-03-28)
## [0.0.1](https://github.com/tinper-bee/bee-anchor/compare/b376c08...v0.0.1) (2019-03-28)

@@ -4,0 +9,0 @@

@@ -82,15 +82,2 @@ /**

<div className="demo1">
<Anchor selector="#my-awesome-nav a" offset={()=>{
return document.querySelector('#tinperBeeDemo .u-panel-heading').getBoundingClientRect().height
}}>
<ul id="my-awesome-nav" >
{
this.state.anthors.map(item=>{
return (
<li><a href={`#${item.href}`}>{item.name}</a></li>
)
})
}
</ul>
</Anchor>
<div className="content">

@@ -109,2 +96,13 @@ {

</div>
<Anchor selector="#my-awesome-nav a">
<ul id="my-awesome-nav" >
{
this.state.anthors.map(item=>{
return (
<li><a href={`#${item.href}`}>{item.name}</a></li>
)
})
}
</ul>
</Anchor>
</div>

@@ -111,0 +109,0 @@

@@ -10,3 +10,3 @@ import React, { Component } from 'react';

var Demo1 = require("./demolist/Demo1");var DemoArray = [{"example":<Demo1 />,"title":" 基本示例","code":"/**\n *\n * @title 基本示例\n * @description 基本示例\n *\n */\nimport React, { Component } from 'react';\nimport { Anchor } from 'tinper-bee';\n\nclass Demo1 extends Component {\n constructor(props){\n super(props);\n this.state={\n anthors:[\n {\n href:\"one\",\n name:\"RISE\",\n content:\" Welcome to the war we've only begun so \\n \"\n + \"Pick up your weapon and face it \\n \"\n + \"There's blood on the crown go and take it \\n \"\n + \"You get one shot to make it out alive so \\n \"\n + \"Higher and higher you chase it \\n \"\n + \"It's deep in your bones go and take it \\n \"\n + \"This is your moment now is your time so \\n \"\n + \"Prove yourself and \\n \"\n + \"RISE RISE\",\n },\n {\n href:\"two\",\n name:\"Legends\",\n content:\" Legends never die when the world is calling you \\n \"\n + \"Can you hear them screaming out your name \\n \"\n + \"Legends never die they become a part of you \\n \"\n + \"Every time you bleed for reaching greatness \\n \"\n + \"Relentless you survive \\n \"\n + \"They never lose hope when everything's cold and the fighting's near \\n \"\n + \"It's deep in their bones they'll run into smoke when the fire is fierce \\n \"\n + \"Oh pick yourself up 'cause\"\n },\n {\n href:\"three\",\n name:\"Ignite\",\n content:\" There's a fire that burns inside \\n \"\n + \"It's an instinct that never lies \\n \"\n + \"The target's tattooed between our eyes \\n \"\n + \"Stand and fight \\n Under the lights on the high stage \\n \"\n + \"A part of your life it can take away \\n \"\n + \"Just like the blood running through your veins \\n \"\n + \"Everyone's watching through your eyes\"\n },\n {\n href:\"four\",\n name:\"Worlds Collide\",\n content:\" Do we fight to hold our heads up high \\n \"\n + \"And beat the drum to what we love \\n \"\n + \"Risk the fall, oh we have felt it all \\n \"\n + \"Come crashing down from far above \\n \"\n + \"Stars arising, countless worlds colliding \\n \"\n + \"Only one will take it all \\n \"\n + \"Can we bring to fall the giants \\n \"\n + \"Can we make the final call\"\n },\n {\n href:\"five\",\n name:\"Warriors\",\n content:\" As a child, you would wait \\n \"\n + \"And watch from far away. \\n \"\n + \"But you always knew that you'll be the one \\n \"\n + \"that work while they all play. \\n \"\n + \"And you, you lay, awake at night and scheme \\n \"\n + \"of all the things that you would change \\n \"\n + \"but it was just a dream! \\n \"\n + \"Here we are, don't turn away now \\n \"\n + \"we are the warriors that built this town.\"\n }\n ]\n }\n }\n render() {\n return ( \n <div className=\"demo1\"> \n <Anchor selector=\"#my-awesome-nav a\" offset={()=>{\n return document.querySelector('#tinperBeeDemo .u-panel-heading').getBoundingClientRect().height\n }}>\n <ul id=\"my-awesome-nav\" >\n {\n this.state.anthors.map(item=>{\n return (\n <li><a href={`#${item.href}`}>{item.name}</a></li>\n )\n })\n }\n </ul>\n </Anchor>\n <div className=\"content\">\n {\n this.state.anthors.map(item=>{\n return (\n <p id={item.href}>\n <pre>\n {item.content}\n </pre>\n </p>\n )\n })\n }\n </div>\n </div>\n \n )\n }\n}\n","desc":" 基本示例","scss_code":".demo1{\n .content{\n p{\n height: 500px;\n }\n display: inline-block\n }\n .u-anchor{\n display: inline-block;\n width: 200px;\n }\n #my-awesome-nav {\n position: fixed;\n top: 80px;\n li{\n line-height: 30px;\n height: 30px;\n a{\n color:#424242;\n }\n }\n }\n #my-awesome-nav li.active {\n border-right: 2px solid #E14C46\n }\n}"}]
var Demo1 = require("./demolist/Demo1");var DemoArray = [{"example":<Demo1 />,"title":" 基本示例","code":"/**\n *\n * @title 基本示例\n * @description 基本示例\n *\n */\nimport React, { Component } from 'react';\nimport { Anchor } from 'tinper-bee';\n\nclass Demo1 extends Component {\n constructor(props){\n super(props);\n this.state={\n anthors:[\n {\n href:\"one\",\n name:\"RISE\",\n content:\" Welcome to the war we've only begun so \\n \"\n + \"Pick up your weapon and face it \\n \"\n + \"There's blood on the crown go and take it \\n \"\n + \"You get one shot to make it out alive so \\n \"\n + \"Higher and higher you chase it \\n \"\n + \"It's deep in your bones go and take it \\n \"\n + \"This is your moment now is your time so \\n \"\n + \"Prove yourself and \\n \"\n + \"RISE RISE\",\n },\n {\n href:\"two\",\n name:\"Legends\",\n content:\" Legends never die when the world is calling you \\n \"\n + \"Can you hear them screaming out your name \\n \"\n + \"Legends never die they become a part of you \\n \"\n + \"Every time you bleed for reaching greatness \\n \"\n + \"Relentless you survive \\n \"\n + \"They never lose hope when everything's cold and the fighting's near \\n \"\n + \"It's deep in their bones they'll run into smoke when the fire is fierce \\n \"\n + \"Oh pick yourself up 'cause\"\n },\n {\n href:\"three\",\n name:\"Ignite\",\n content:\" There's a fire that burns inside \\n \"\n + \"It's an instinct that never lies \\n \"\n + \"The target's tattooed between our eyes \\n \"\n + \"Stand and fight \\n Under the lights on the high stage \\n \"\n + \"A part of your life it can take away \\n \"\n + \"Just like the blood running through your veins \\n \"\n + \"Everyone's watching through your eyes\"\n },\n {\n href:\"four\",\n name:\"Worlds Collide\",\n content:\" Do we fight to hold our heads up high \\n \"\n + \"And beat the drum to what we love \\n \"\n + \"Risk the fall, oh we have felt it all \\n \"\n + \"Come crashing down from far above \\n \"\n + \"Stars arising, countless worlds colliding \\n \"\n + \"Only one will take it all \\n \"\n + \"Can we bring to fall the giants \\n \"\n + \"Can we make the final call\"\n },\n {\n href:\"five\",\n name:\"Warriors\",\n content:\" As a child, you would wait \\n \"\n + \"And watch from far away. \\n \"\n + \"But you always knew that you'll be the one \\n \"\n + \"that work while they all play. \\n \"\n + \"And you, you lay, awake at night and scheme \\n \"\n + \"of all the things that you would change \\n \"\n + \"but it was just a dream! \\n \"\n + \"Here we are, don't turn away now \\n \"\n + \"we are the warriors that built this town.\"\n }\n ]\n }\n }\n render() {\n return ( \n <div className=\"demo1\"> \n <div className=\"content\">\n {\n this.state.anthors.map(item=>{\n return (\n <p id={item.href}>\n <pre>\n {item.content}\n </pre>\n </p>\n )\n })\n }\n </div>\n <Anchor selector=\"#my-awesome-nav a\">\n <ul id=\"my-awesome-nav\" >\n {\n this.state.anthors.map(item=>{\n return (\n <li><a href={`#${item.href}`}>{item.name}</a></li>\n )\n })\n }\n </ul>\n </Anchor>\n </div>\n \n )\n }\n}\n","desc":" 基本示例","scss_code":".demo1{\n .content{\n p{\n height: 500px;\n }\n display: inline-block\n }\n .u-anchor{\n display: inline-block;\n }\n #my-awesome-nav {\n position: fixed;\n top: 200px;\n right: 300px;\n li{\n padding: 0 10px;\n line-height: 30px;\n height: 30px;\n background: #FFF;\n a{\n color:#424242;\n }\n }\n }\n #my-awesome-nav li.active {\n border-left: 2px solid #E14C46\n }\n}"}]

@@ -13,0 +13,0 @@

{
"name": "bee-anchor",
"version": "0.0.1",
"version": "0.0.2",
"description": "Anchor ui component for react",

@@ -5,0 +5,0 @@ "keywords": [

@@ -39,3 +39,3 @@ import React, { Component } from 'react';

let props = this.props;
this.anchor = new Gumshoe('#my-awesome-nav a',{
this.anchor = new Gumshoe(props.selector,{
...props

@@ -42,0 +42,0 @@ })

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc